-
I am using VB6 and transferring data to an MS Excel 97 spreadsheet.
The prob is when I create an instance of XL:
Global gobjXLApp as Excel.Application 'Done in Global.bas
Set gobjXLApp = New Excel.Application 'done in frmMain.frm
'or alternatively I have used...
Set gobjXLApp = CreateObject("Excel.Application")
'The Excel 8.0 Object library is referenced
while either of the above methods works on my PC a PC here at work has the following error.
"Error 458: Variable uses an Automation type not supported in Visual Basic."
This error is caused by either of the above methods, but only on this one PC?
Both the PC I developed this code on and the troubled PC are running VB6 SP4, NT4 SP5, Office 97 SR2. Any ideas??
Cheers.
-
Hi there,
Does the PC at your work have installed Excel on it?
-
Yep! Excel 97 is installed.
I have downloaded a couple of VB-Excel automation examples from the web and they have the same error on this particular PC.. so I am thinking of getting my hands on the MS Office 97 CD and re-installing (the problem is obviously not with my code but rather the PC?).
-
I have re-installed Office 97. No more problem!
Cheers.
-
Allrighty!!!
Congratulations
André