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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE Question

Status
Not open for further replies.

nakedpanic

Programmer
May 17, 2001
1
US
Is there a way for me to open a selected Excel worksheet from a workbook using OLE.CreateLink. I know I can use a file name but how can I specify which sheet to display? Or is there maybe a better way for me to simply display an Excel worksheet in a VB Form. I just want to display with no active editing functionality. However, I do want the ability to print the Excel worksheet.

Thanks for your help,
Karl
 
You can add something like this to your code:

OLE1.object.worksheets(3).Select

This would show worksheet number 3 on your OLE object(OLE1). I think you cannot set wich worksheet to open on the OLE object properties. But this should do the trick.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top