PDA

View Full Version : CreateObject



Vincey
10-21-2003, 03:36 AM
Hi,
I'm trying to install an addin into Excel without much luck, is this possible within installshield please help, I'm new to DevStudio

set xl = CreateObject("Excel.application");
xl.Workbooks.Add();
set oAddIn = xl.Addins.Add(TARGETDIR ^ "AddIn.xla");
xl.RegisterXLL(oAddIn.FullName);
xl.Addins("AddIn").Installed = TRUE;
set oAddIn = NULL;
xl.Quit();

alex42
10-21-2003, 06:05 AM
Try to embed all object related functions in try-catch-endcatch statements.
like so:
try
set xl = CreateObject("Excel.application");
catch
MessageBox(Err.Description, WARNING);
endcatch;

I don't know bout Excel, but I'm using the SQLDMO object and it works perfect.

Vincey
10-21-2003, 07:57 AM
Thanks
It works