How do I change a macro to call a sheet from another workbook

  • Thread starter Thread starter Nic@Rolls-Royce
  • Start date Start date
N

Nic@Rolls-Royce

Hi

This is proberably v easy, however I can't figure it



I use a VBA macro to call up some infor and part of it is

Worksheets("Gate A").Rows("10:3000").EntireRow.Hidden = False
Worksheets("Question Database [Q]").Range("con_control").Copy
With Worksheets("Question Database [Q]")



"Gate A" & "Question Database" Are now held in a workbook calle
'Database'

How do I amend the Macro to look at the sheet in the workbook rathe
than the workbook it is in now???


Thankyou in advance

Ni
 
As long as Database workbook is already open.

Workbooks("Database").Worksheets("Gate A").R .... etc..


If it's not already openthen you could use this:

Workbooks.Open ("C:\Database.xls")
 

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

Back
Top