ThisWorkBook problem

  • Thread starter Thread starter Blogd_Node
  • Start date Start date
B

Blogd_Node

Hi,

Just starting coding VB in Excel.
Am more familiar with Access, so I know
just enough VB to be dangerous to myself...
:-)

I have a macro (in PERSONAL.XLS) which is run from within TEST.XLS.

In the line of code
set basebook = thisworkbook

"ThisWorkbook" refers to personal.xls and NOT test.xls.

How do I refer to the TEST.XLS ?

Many thanks

David
 
set basebook = Workbooks("Test.xls")

if it isn't always test.xls but it will be the active workbook

set basebook = ActiveWorkbook
 
Thanks Tom / Andrew.

Works fine now! Much 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

Back
Top