creation of a macro in a master data collection workbook.

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

I am trying to create a macro which will copy data from
the sheet it is embedded in to a master data sheet
whatever the data sheet has been named. i.e. can i embed
a macro which will change it's host name to whatever the
workbook is named.
 
The Host Workbook is the object named «ThisWorkbook».
The hilighted (active) workbook is the object
named «ActiveWorkbook».
Of course, Thisworkbook and Activeworkbook could be the
same.
E.g.
ThisWorkbook.sheets(1).range("A1:D10").copy destination:=
ActiveWorkbook.sheets(2).Range("A20")
 

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