View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default Run-time error when trying to work with different sheet

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-