Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object creating Excel 95 rather than Excel XP

Status
Not open for further replies.

TimGoff

Technical User
Jul 16, 2002
166
GB
Hi,

I have Excel 95 and XP on my desktop. When I create a Excel object in my code using...

Set objExcel = CreateObject("Excel.Application")

...is fires up 95 rather than XP.

How do I change it to XP?

Thanks in advance,

Tim
 
I'm still on 2000, so my VBA help doesn't go far enough - but you should be able to do something like:

Set objExcel = CreateObject("Excel.Application.9")

(I think that particular one starts up Excel 2000).

Check your VBA help, topic "OLE Programmatic Identifiers"
Rob
[flowerface]
 
Works a treat - thanks Rob

For reference Excel XP is Excel.Application.10 - which makes sense really
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top