Opening Excel Worksheet

G

Guy Billinge

Hi

I want to create macro in Word that opens Excel and a specific workbook
("F:\ACOM1810\Database.xls") to a specific sheet ("data").

Please could someone help me with the code.

I have already tried but i keep getting a compile error, using this code:

Dim xlApp As Excel.Application
Dim xlWkBk As Excel.Workbooks
Dim xlWkSh As Excel.Worksheet

Set x1App = New Excel.Application
Set xlWkBk = xlApp.Workbooks.Open("F:\ACOM1810\Database.xls")
Set xlWkSh = xlWkBk.Sheets("Data")

Any help would be greatly appreciated
 

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