Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark_J
 
Posts: n/a
Default in Excel how do you set a workbook to only open on the first work.

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.
  #2   Report Post  
Gordon
 
Posts: n/a
Default

Mark_J wrote:
|| In Microsoft Excel how do you open a workbook to ensure it only
|| opens one a specified worksheet, no matter what spreadsheet you last
|| saved the workbook in.

I've never heard that that's possible.

--
Interim Systems and Management Accounting
Gordon Burgess-Parker
Director
www.gbpcomputing.co.uk


  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

It's possible but requires VBA code.

Biff

-----Original Message-----
Mark_J wrote:
|| In Microsoft Excel how do you open a workbook to

ensure it only
|| opens one a specified worksheet, no matter what

spreadsheet you last
|| saved the workbook in.

I've never heard that that's possible.

--
Interim Systems and Management Accounting
Gordon Burgess-Parker
Director
www.gbpcomputing.co.uk


.

  #4   Report Post  
jenkinspat
 
Posts: n/a
Default


Mark_J Wrote:
In Microsoft Excel how do you open a workbook to ensure it only opens
one a
specified worksheet, no matter what spreadsheet you last saved the
workbook
in.


It is VARY do able. In VB go to your project and click the
ThisWorkbook

Paste the following-----

Option Explicit

Private Sub Workbook_Open()
Sheets("ENTER YOUR WORKSHEET NAME HERE").Select
End Sub

Your workbook will open at the sheet you enetered evry time regardless
when it was saved on.
Good Luck
Pat


--
jenkinspat
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

With a macro, kind of like this...

Option Explicit
sub auto_open()
worksheets("myfavoritesheet").select
end sub

Change the name to match your worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mark_J wrote:

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.


--

Dave Peterson


  #6   Report Post  
Mark
 
Posts: n/a
Default

Thanks worked a treat. Any ideas on how I can stop access to the options in
a protected worksheet/workbook?

Kind Regards...Mark

"jenkinspat" wrote:


Mark_J Wrote:
In Microsoft Excel how do you open a workbook to ensure it only opens
one a
specified worksheet, no matter what spreadsheet you last saved the
workbook
in.


It is VARY do able. In VB go to your project and click the
ThisWorkbook

Paste the following-----

Option Explicit

Private Sub Workbook_Open()
Sheets("ENTER YOUR WORKSHEET NAME HERE").Select
End Sub

Your workbook will open at the sheet you enetered evry time regardless
when it was saved on.
Good Luck
Pat


--
jenkinspat

  #7   Report Post  
Mark
 
Posts: n/a
Default

Thanks Dave work a treat. Any ideas on how I can stop people accessing the
options in a protected worksheet or workbook?

Kind Regards...Mark

"Dave Peterson" wrote:

With a macro, kind of like this...

Option Explicit
sub auto_open()
worksheets("myfavoritesheet").select
end sub

Change the name to match your worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mark_J wrote:

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.


--

Dave Peterson

  #8   Report Post  
Dave Peterson
 
Posts: n/a
Default

You can stop the users from getting to Tools|options with code like:

Option Explicit
Private Sub Workbook_Activate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, False)
End Sub
Private Sub Workbook_Deactivate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, True)
End Sub

Sub EnableDisableByID(myID As Long, TurnOn As Boolean)
Dim myCommandBar As CommandBar
Dim myCtrl As CommandBarControl

For Each myCommandBar In Application.CommandBars
Set myCtrl = myCommandBar.FindControl(ID:=myID, recursive:=True)
If myCtrl Is Nothing Then
'do nothing
Else
myCtrl.Enabled = TurnOn
End If
Next myCommandBar
End Sub

You can plop all 3 subs right into the ThisWorkbook module. (The last one could
go into a general module, instead.)

But personally, I think won't stop any user who can find the newsgroups.



Mark wrote:

Thanks Dave work a treat. Any ideas on how I can stop people accessing the
options in a protected worksheet or workbook?

Kind Regards...Mark

"Dave Peterson" wrote:

With a macro, kind of like this...

Option Explicit
sub auto_open()
worksheets("myfavoritesheet").select
end sub

Change the name to match your worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mark_J wrote:

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default in Excel how do you set a workbook to only open on the first w

Dave, This code works great, but now I've disabled my Options and cannot get
it enabled again. Simply deleting the code from VBA This Workbook did not
work. Please advise.

Thanks

"Dave Peterson" wrote:

You can stop the users from getting to Tools|options with code like:

Option Explicit
Private Sub Workbook_Activate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, False)
End Sub
Private Sub Workbook_Deactivate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, True)
End Sub

Sub EnableDisableByID(myID As Long, TurnOn As Boolean)
Dim myCommandBar As CommandBar
Dim myCtrl As CommandBarControl

For Each myCommandBar In Application.CommandBars
Set myCtrl = myCommandBar.FindControl(ID:=myID, recursive:=True)
If myCtrl Is Nothing Then
'do nothing
Else
myCtrl.Enabled = TurnOn
End If
Next myCommandBar
End Sub

You can plop all 3 subs right into the ThisWorkbook module. (The last one could
go into a general module, instead.)

But personally, I think won't stop any user who can find the newsgroups.



Mark wrote:

Thanks Dave work a treat. Any ideas on how I can stop people accessing the
options in a protected worksheet or workbook?

Kind Regards...Mark

"Dave Peterson" wrote:

With a macro, kind of like this...

Option Explicit
sub auto_open()
worksheets("myfavoritesheet").select
end sub

Change the name to match your worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mark_J wrote:

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.

--

Dave Peterson


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default in Excel how do you set a workbook to only open on the first w

Hi Dorianne

With Dave's code it Enable 522 when you close or go to another workbook.
Insert the code in a new workbook and test it again


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dorianne" wrote in message ...
Dave, This code works great, but now I've disabled my Options and cannot get
it enabled again. Simply deleting the code from VBA This Workbook did not
work. Please advise.

Thanks

"Dave Peterson" wrote:

You can stop the users from getting to Tools|options with code like:

Option Explicit
Private Sub Workbook_Activate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, False)
End Sub
Private Sub Workbook_Deactivate()
Dim myID As Long
myID = 522 '&Options...
Call EnableDisableByID(myID, True)
End Sub

Sub EnableDisableByID(myID As Long, TurnOn As Boolean)
Dim myCommandBar As CommandBar
Dim myCtrl As CommandBarControl

For Each myCommandBar In Application.CommandBars
Set myCtrl = myCommandBar.FindControl(ID:=myID, recursive:=True)
If myCtrl Is Nothing Then
'do nothing
Else
myCtrl.Enabled = TurnOn
End If
Next myCommandBar
End Sub

You can plop all 3 subs right into the ThisWorkbook module. (The last one could
go into a general module, instead.)

But personally, I think won't stop any user who can find the newsgroups.



Mark wrote:

Thanks Dave work a treat. Any ideas on how I can stop people accessing the
options in a protected worksheet or workbook?

Kind Regards...Mark

"Dave Peterson" wrote:

With a macro, kind of like this...

Option Explicit
sub auto_open()
worksheets("myfavoritesheet").select
end sub

Change the name to match your worksheet.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Mark_J wrote:

In Microsoft Excel how do you open a workbook to ensure it only opens one a
specified worksheet, no matter what spreadsheet you last saved the workbook
in.

--

Dave Peterson


--

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
Why can I not open an Excel Compound file with Office Excel xp? Wetcoast40 Excel Discussion (Misc queries) 1 February 4th 05 10:42 PM
i can't open excel workbook if it has a chart in it! Aidan Excel Discussion (Misc queries) 2 February 2nd 05 09:37 AM
Unable to open Mac Excel 98 in Mac Excel 2004 Jean-Yves Fortin Excel Discussion (Misc queries) 4 January 30th 05 06:11 PM
can a workbook with macros created in excel 2003 work in excel 20. Steve Venti Excel Discussion (Misc queries) 2 December 27th 04 02:31 PM
Can no open workbook tandem Excel Worksheet Functions 4 December 1st 04 12:45 AM


All times are GMT +1. The time now is 08:31 PM.

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

About Us

"It's about Microsoft Excel"