open Excel from Word 2003

M

muyBN

I've seen in this forum how to copy an Excel worksheet into Word but I only
need to open an Excel file and not do anything else to it from the macro.
What do I do to actually open the file with the code below?

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("path\file.xls")
 
D

Doug Robbins - Word MVP

Add

xlApp.Visible = True



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

muyBN

Thanks, Doug. Perfect solution.
--
Bryan


Doug Robbins - Word MVP said:
Add

xlApp.Visible = True



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top