Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting range in an inactive sheet

Status
Not open for further replies.

MuskyMan

Technical User
Jul 31, 2002
36
US
Requesting help for this rookie! Having run-time error after the loop, can't seem to get the syntax or I'm missing something.

Thanks for the help..


Private Sub CommandButton1_Click()

For i = 1 To 110
Sheet2.Cells(i, 1) = i
Next i

Workbooks("PM").Worksheets("LastMnthPM").Range(Range(Cells(1, 1), Cells(i, 1))).Select

End Sub
 
Hi,

Please post VBA questions in Forum707.

You cannot SELECT an object on a sheet that is not active. Why do you want to SELECT? Please answer in your new thread in Forum707.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top