View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Slawek Czyzak Slawek Czyzak is offline
external usenet poster
 
Posts: 1
Default Workbook_Open() Error

Hi



Sheets("Enter").Activate
ActiveSheet.CommandButton1.Visible = True
ActiveSheet.CommandButton2.Visible = False
Range("AP2").Select


Slawek(Poland)



Uzytkownik "Minitman" napisal w wiadomosci
...
Greetings,

I am attempting to turn one CommandButton visible and to make another
one not visible when I open my workbook. What I am getting is a
Visual Basic error message:

Run-time error '424'
Object required

This is what I tried in "ThisWorkbook" (the * is the line
highlighted by Debug):

Private Sub Workbook_Open()

Sheets("Enter").Select
* CommandButton1,Visible = True
CommandButton2,Visible = False
Range("AP2").Select

End Sub

Anyone see what is wrong with code?

Any help would be most appreciated.

TIA

-Minitman