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

Open a specific file in excel

Status
Not open for further replies.

Drenda

Programmer
Sep 1, 2007
85
GB
Can anyone help

I would like to open a specific excel file after click on a command button from a form

Is ther any code / macro that can do this

thanks
 
Shell Function

Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero.

Syntax

Shell(pathname[,windowstyle])

The Shell function syntax has these named arguments:

Part Description
pathname Required; Variant (String). Name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive.
windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus.
 
You may also consider the Application.FollowHyperlink method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Drenda
It is good to use the link
"Thank ... for this valuable post!"
to thank people in Tek-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top