0
Range("A1:Z9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False

this code fails if Sheet2 is hidden. is there any way around it?

BigBen
  • 46,229
  • 7
  • 24
  • 40
  • `Worksheets("Sheet2").Range("A1:Z9").Value = ActiveSheet.Range("A1:Z9").Value`. – BigBen Mar 01 '21 at 16:34
  • 2
    And the obligatory link to https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba?rq=1 – FunThomas Mar 01 '21 at 16:38

0 Answers0