View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Can't get past Line 3 of code

You can only select on the active sheet.

So maybe just adding

worksheets("Sheet1").select

would help

Jim May wrote:

Can someone point out my fault in line 3?
TIA,

Sub tester()
Set srng = Worksheets("Sheet1").Range("A1").CurrentRegion ' Covers
Range A1:C10
srng.Offset(1, 0).Resize(srng.Rows.Count - 1, 3).Select << error
.... In Progress
Set drng = Worksheets("Sheet2").Range("A2")
End Sub


--

Dave Peterson