Selecting data in another spreadsheet

Spellchamp

New Member
Joined
Jul 15, 2014
Messages
3
Hi,
I'm trying to select a range of cells in a worksheet that's open on the computer but is not the workbook where the macro is running.
I keep getting this message though:
"Subscript out of range"
with the following line highlighted:
Workbooks("Book1").Activate

I understand it has something to do with not being able to open Book1(where the data I want to select is stored) but I have no idea why.
Any help would be appreciated
Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
So that worked, but what I'm trying to do is select a range of values in the other worksheet based on an input from the user. I was trying to use:

Set x = Range(Cells(1, 1), Cells(3, 3))
ActiveSheet.x.Select


but I get the error "Object doesn't support this property or method"
Is there a way I can select a range of cells based on a numeric value using this method?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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