Cannot create Object

Results 1 to 2 of 2

Thread: Cannot create Object

  1. #1
    Join Date
    Dec 1969

    Default Cannot create Object

    Hello all!<BR><BR>Sorry to disturb on Sunday but this issue is driving me crazy!<BR>I need to copy the contents of an .txt file to an excel sheet.<BR>The code I have got is:<BR><BR>&#060;%<BR> Dim appExcel, DestFile, OrigFile<BR><BR> OrigFile = "D:Reports\exam_1.txt"<BR> DestFile = "D:Reportsexam_1.xls" <BR><BR> Set appExcel = CreateObject("Excel.Application.8")<BR><BR> appExcel.Workbooks.OpenText OrigFile, Null, 1, Null, Null, Null, True, Null,True<BR> appExcel.activeworkbook.saveas DestFile, -4143<BR> appExcel.activeworkbook.close<BR> appExcel.quit<BR> Set appExcel = Nothing<BR>%&#062;<BR><BR>However I keep on getting : ActiveX component can&#039;t create object: &#039;CreateObject&#039; which disapears if I do not include line: <BR>appExcel.quit...<BR><BR>I have Windows NT and MSExcel 97...<BR>Any clue about how to do this simple task would be very very welcome!<BR><BR>THANK YOU!<BR>S

  2. #2
    Join Date
    Dec 1969

    Default RE: Cannot create Object

    try Set appExcel = CreateObject("Excel.Application") instead of Set appExcel = CreateObject("Excel.Application.8") <BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts