View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 576
Default Run-time error when trying to work with different sheet

Yep,

I just got finished doing some code and went round and round on some
similar issues until I got it right...

F&F (fun and frustrating).

Keep on Exceling!

--
sb
"TBA" wrote in message
...

"steve" wrote in message
...
TBA,

Seems Excel wants the sheet specified... this works

Private Sub cmd_RankBest_Click()
Worksheets("Sheet1").Select
Worksheets("Sheet1").Range("A1:Q36").Select 'selecting a range on
sheet1
End Sub


Thanks Steve! You were on the right track. After Googling this morning I
got a tip where I used

Worksheets("Sheet1").Select
ActiveSheet.Range("A1:Q36").Select 'selecting a range on sheet1

Basically you were right about Excel wanting the sheet specified. Oh I

love
this stuff!

;)

-gk-