Thread: Open workbook
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
capt capt is offline
external usenet poster
 
Posts: 67
Default Open workbook

Thanks Dave that sorted the problem.
--
capt


"Dave Peterson" wrote:

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

capt wrote:

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?
--
capt


--

Dave Peterson