Jean-Guy
Thu Oct 20 09:32:11 CDT 2005
LW_Greeney was telling us:
LW_Greeney nous racontait que :
> I would like to open an excel document froma command button in word,
> so I can edit the sheet and then return to the word document. I dont
> want to insert the excel document i was to actually load it up fully
> away from word
>
> "Jean-Guy Marcil" wrote:
>
>> LW_Greeney was telling us:
>> LW_Greeney nous racontait que :
>>
>>> Hello Again Guys What the VB code to open up an Escel Document
>>> externally not within work from a button which is inputted into a
>>> word document?
Why not just launch Excel the regular way?
In any case...
Set a reference to the Microsoft Excel Object Library in "References..."
from the "Tools" menu in the VBA Editor.
Then call this code from the command button:
'_______________________________________
Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open "C:\Book1.xls"
xlApp.Visible = True
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org