i have been struggling with this code:
Open "c:\textout.txt" For Input As #1
' run the EOF to get all of the files contents
Do While Not EOF(1)
' set the contents of the file into the variable "strInputLine"
Line Input #1, strInputLine
Loop
' call the excel sheet and set parameters
ExcelSheet.Range("A11".Font.Bold = True
'trying to put contents of text file into excel sheet
objExcel.Activesheet.Paste = strInputLine
this works up to the point of where i am pasteing the file into the excel worksheet. I am getting the variable " strInputLine" in the cell instead of the complete file.
can i do this? or what is the correct way?
thanks in advance! -I)
Open "c:\textout.txt" For Input As #1
' run the EOF to get all of the files contents
Do While Not EOF(1)
' set the contents of the file into the variable "strInputLine"
Line Input #1, strInputLine
Loop
' call the excel sheet and set parameters
ExcelSheet.Range("A11".Font.Bold = True
'trying to put contents of text file into excel sheet
objExcel.Activesheet.Paste = strInputLine
this works up to the point of where i am pasteing the file into the excel worksheet. I am getting the variable " strInputLine" in the cell instead of the complete file.
can i do this? or what is the correct way?
thanks in advance! -I)