View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jos Vens[_4_] Jos Vens[_4_] is offline
external usenet poster
 
Posts: 4
Default Reference to external program

Hi,

I'd like to know if it is possible to make a reference in vba to an external
program.

Now, I can make an object-reference to Excel like this:

Set xlExcel = New Excel.Application
xlExcel.Visible = True
xlExcel.Workbooks.Open vFile, False, True

I'd like to do the same, but now to a different (not registered in windows)
program. The reason is this: I made a portable version of excel (including
VBA) and I want to let my application start with that portable version
(Excel 2003), even if Excel 2007 is installed. In that case, I do not depend
on the caprices of Microsoft for my further development (like menu's which
disappear in office 2007).

My new code should be (Excel2003 = portable version of Excel 2003)

Set xlExcel = New Excel2003.Application
xlExcel.Visible = True
xlExcel.Workbooks.Open vFile, False, True

It would also be interesting to do this to other programs I use within VBA.
I think it has to go within the Class Module-section, but I don't know how
to start.

Thanks in advance
Jos Vens