Thanks for the link. By the way, all of the links that you gave me were to put the data into a new excel when i wanted to put it into an existing excel. Is there a specific line of coding where it will put data directly into the existing excel? I just need that. Thank you for being patient with me.
Yes, there is. Firstly you need to find out if the excell sheet is open or not. Unfortunately in vb6, it only checks for the LAST workbookthat has been opened. If there is more than one workbook open, it will only read the last open. Once you have determined that the workbook is open, activate it and add the data to the sheet -
Dim MaximiseExcel As Excel.Application
On Error Resume Next
Set MaximiseExcel = GetObject(, "Excel.Application" 'Do not forget the comma ',' after the first bracket!!)
'All code to add to workbook here.
'ExcelOpen.ActiveWindow.Caption can be used to determine that you will be adding the data to the correct workbook as well.
MaximiseExcel.WindowState = xlMaximized 'Only use this to show the workbook once all the data has been added.
The "GetObject" can be used for ALL MS office applications.