Basically - you cannot select anything what is not on the currently active sheet. So either:
Sub rangea()
With ActiveWorkbook.Worksheets("WORKINGS")
.Activate
.Range("A1").CurrentRegion.Select
End With
End Sub
or
Sub rangea()
dim myrange as range
Set myrange=ActiveWorkbook.Worksheets("WORKINGS").Range("A1").CurrentRegion
' and here do what you need with myrange, like for instance:
myrange.clearcontents
End Sub
or of course
Sub rangea()
With ActiveWorkbook.Worksheets("WORKINGS").Range("A1").CurrentRegion
' and here do what you need with myrange, like for instance:
.clearcontents
End With
End Sub
Bookmarks