Open an Excel file in a new Excel session
Type this code into a text file and save the text file with extension VBS,
like (MY.VBS)
set aa=createobject("Excel.Application")
aa.Workbooks.Open "c:\my.xls"
aa.visible = true
set aa = nothing
Change line 2 to show your workbook name.
Create your shortcut to this VBS file in the usual way.
"Tetsuya Oguma" wrote:
Hi all,
This is a bit tricky question. I would like to open my Excel file in a new
session of Excel.
First, I thought of creating a shortcut to the file and append switch like
"/e" or "/m". Nope! Doesn't work!
Next, VBA code (e.g., using CreatObject). But given that the code resides
within the file, how can I open the file itself in the new Excel session???
Any idea? I prefer creating a shortcut for the ease of use for our users and
then do something extra.
Thanks for your ideas/thorughts.
---
Tetsuya Oguma, Singapore
|