#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Open workbook

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Open workbook

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
  #3   Report Post  
Posted to microsoft.public.excel.misc
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
Need VB code for workbook open to open a link Daniel Baker Excel Discussion (Misc queries) 2 August 18th 06 01:30 AM
Search open sheets in workbook and insert into open sheet punx77 Excel Discussion (Misc queries) 0 March 6th 06 05:07 PM
Excel workbook does not open in open window on desktop DeanH Excel Discussion (Misc queries) 2 March 8th 05 09:51 AM
Importing Data from unopened Workbook into an open Workbook GrayesGhost Excel Discussion (Misc queries) 0 March 5th 05 11:25 PM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"