Run-time error 1004 Select method of Range class failed

Joined
Jul 28, 2010
Messages
10
I have what I thought was a simple macro, to transfer a range of cells from one worksheet to the next available row on another worksheet:

Private Sub CommandButton2_Click()
' Save & Print button

Sheets("TOOL").Range("BA132:EX132").Copy
Sheets("Data").Activate
Range("A65536").Select
ActiveCell.End(xlDown).Offset(1).Select
ActiveSheet.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("TOOL").Activate
Range("A26").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

When I click on the command button, I get the message
Run-time error '1004':
Select method of Range class failed.
When I click on Debug, it highlights the line:
Range("A65536").Select
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Try this

Code:
Private Sub CommandButton2_Click()
' Save & Print button

Sheets("TOOL").Range("BA132:EX132").Copy
Sheets("Data").Range("A65536").End(xlUp).Offset(1).PasteSpecial Paste:=xlPasteValues
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,935
Members
449,195
Latest member
Stevenciu

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