Select Method of Worksheet Class Failed

sherylserran

New Member
Joined
Jul 19, 2012
Messages
2
I have an existing excel template which is working fine. We just added some tabs and incorporate on the macro, then I encounter the error.

When I try to debug the error is with the 2nd line as per below (in bold font and underlined)
It says that Identifier under cursor is not recognized.

ActiveSheet.Range("$A$5").Select
ActiveCell.CurrentRegion.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range("A1").Select

Please help, I do not know what to do with this.


Thanks.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,099
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Does it help if you skip all that selecting:
Rich (BB code):
With ActiveSheet.Range("$A$5").CurrentRegion
.Value = .Value
End With
 

sherylserran

New Member
Joined
Jul 19, 2012
Messages
2
Thanks, Rory.

I tried to replace the code I made with the code you gave, a new error message showed up

Method 'Select of object'_Worksheet' Failed

Still dont' know what to do.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,099
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
There weren't any select statements in my code, so what line caused that error? (are you trying to select a hidden sheet?)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,262
Messages
5,769,099
Members
425,517
Latest member
cheechburger

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
Top