View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
TBA[_2_] TBA[_2_] is offline
external usenet poster
 
Posts: 58
Default Run-time error when trying to work with different sheet

Already did that, doesn't help.

-gk-

"J.E. McGimpsey" wrote in message
...
With XL97, you need to set the TakeFocusOnClick property of the
command button to False.

In article ,
"TBA" wrote:

Excel 97
Windows 2k Pro

I have a command button on sheet2 that needs to do some "stuff" on

sheet1
and then copy said "stuff" back onto sheet2. This is a stripped down
example of code for my command button on sheet2:

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

But, I'm getting a run-time error '1004':
Select method of Range class failed

Is my code flawed?

Any insights greatly appreciated.

-gk-