Command Button to open excel file

Local time
Tomorrow, 07:48
Joined
Jul 12, 2006
Messages
70
Is this possible? A command button when click will open an excel file... :rolleyes:

Cheers!
Sheila
 
Dim objExcel As Object
Dim strFile As String

strFile = "C:\MyFile.xls"
Set objExcel = GetObject(strFile)
objExcel.Application.Visible = True
objExcel.Windows(1).Visible = True
 
Hi road warrior! Thanks for the code. Forgive a novice... where shall i put this code?

Thanks a million!
Sheila
 
Also, it this also applicable when opening an HTML document using command button?

Thanks again.

Have a nice day!
Sheila
 
Last edited:
Just put it on the click event of a button. As for HTML never done that, perhaps someone else can help.
 
have you tried TransferSpreadsheet in the macro event?
 

Users who are viewing this thread

Back
Top Bottom