VBA Select open workbook

JoeJackson12

New Member
Joined
Jun 26, 2017
Messages
22
Hi, I'm having an extremely frustrating time just selecting on open workbook to copy and paste information.

The workbook I want to select is the workbook running the macro - the macro opens other workbooks, copies data from those workbooks, and pastes into cells in the workbook running the macro. I'm trying to use
Code:
Workbooks("macroworkbook.xlsm")
, but that's not working. Any advice would be much appreciated, as this seems like an easy problem that I'm having trouble solving!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
The built-in object named ThisWorkbook is the workbook running the macro. ThisWorkbook is a Workbook object and you can reference a specific sheet and cell in it like this:
Code:
ThisWorkbook.Worksheets("sheetName").Range("A1")
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top