Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Open an Excel Document in Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LW_Greeney - 19 Oct 2005 21:17 GMT
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?

Cheers Again

Alistaire
Jean-Guy Marcil - 19 Oct 2005 22:48 GMT
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?

???
Please, take a breather and try to re-write your question so that we can
understand it... Personally, I cannot understand what you are asking...
maybe it is too late in the day over here?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

LW_Greeney - 19 Oct 2005 23:16 GMT
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

> LW_Greeney was telling us:
> LW_Greeney nous racontait que :
[quoted text clipped - 7 lines]
> understand it... Personally, I cannot understand what you are asking...
> maybe it is too late in the day over here?
Jean-Guy Marcil - 20 Oct 2005 15:32 GMT
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
[quoted text clipped - 7 lines]
>>> 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
'_______________________________________

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.