Open excel and workbook with VB6
Thanks DM Unseen. I'll give this a try today!
Kevin
"DM Unseen" wrote in message
oups.com...
Kevin,
do not forget:
to set the oExcel.visible = TRue to show excel when it was not running.
Also, when you want excel visible and fully working I would not suggest
automation, but a simple shell:
shell(Me.txtSelectedSpreadsheet)
Excel visibility will be the least of your worries when you want a
fully functional excel(on the other hand, if you don't want that,
automation gives you greater control)
After excel is running, use
Set oBook = GetObject(Me.txtSelectedSpread*sheet) '(this will select
the spreadhseet) Note that you can always skip GetObject(,
"Excel.Application") if you want a spreadsheet, since this will launch
excel if it is not running, and else connect to a running excel. If
your file is already open it will connect to that excel instance that
has your wb open
Set gbl_oExcel = oBook.Parent
Set oSheet =oBook.Sheets("Parameters")
or
Dm Unseen
|