Open workbook

  • Thread starter Thread starter capt
  • Start date Start date
C

capt

Is there anything wrong with this code?
When I open the workbook, it should activate sheet "menu", but I keep
getting a run-time error 57121 with application and object defined error with
it.

Private Sub Workbook_Open()
Worksheets("menu").Select
Worksheets("menu").CommandButton3.Visible = False
UserForm8.Show
End Sub

any ideas?
 
You may want to search google for that error code. Maybe something will pop up
that can help.

But in the meantime, how about trying to qualify those worksheets:

Private Sub Workbook_Open()
me.Worksheets("menu").Select
me.Worksheets("menu").CommandButton3.Visible = False
UserForm8.Show
End Sub
 
Thanks Dave that sorted the problem.
--
capt


Dave Peterson said:
You may want to search google for that error code. Maybe something will pop up
that can help.

But in the meantime, how about trying to qualify those worksheets:

Private Sub Workbook_Open()
me.Worksheets("menu").Select
me.Worksheets("menu").CommandButton3.Visible = False
UserForm8.Show
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top