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

help opening file with command button

Status
Not open for further replies.

Clegg25

MIS
Jul 27, 2003
24
US
Hi,
I am very novice user to VB 6.0
I've created a command button, but i dont know the code to have it open an excel file located, lets say in the a:drive. Please help,
thanks
 
Easy way of opening external programs from VB is the Shell command:

Shell "pathname\xl.exe a:\fred.xls", vbNormalFocus

where pathname is the complete path to your Excel exe, xl.exe is the name of your xl app and the rest is the path and filename to open

Also read faq222-2244 for guidance on how to get better answers from the forum

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top