View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Select method of range class failed problem

Try this:

Private Sub Worksheet_Activate()
Range("a1").Select
With ActiveWindow
.DisplayGridlines = False
.Zoom = 85
End With
End Sub

Does that help?
Post back if you have more questions.

Regards,

Ron
Microsoft MVP - Excel

"Raj" wrote in message
...
Hi,

I have the following code in the Masterdata Worksheet_activate event.
I want Range a1 to be selected when the worksheet is activated:

Private Sub Worksheet_Activate()
ActiveWindow.DisplayGridlines = False
Worksheets("Masterdata").Range("a1").Select
ActiveWindow.Zoom = 85
End Sub

I get error "select method of range class failed" . Please help.

Thanks in advance.
Regards,
Raj