Setting Start Sheet in VB

Schodoodles

New Member
Joined
Jan 25, 2005
Messages
17
Hi,

Is there anyway to set a start sheet when you open up excel?
I've checked the boards but not much seems to be working for me :(

The code I've been trying to use is this on a worksheet called 'Intro Sheet' that has a few menus.

Code:
Private Sub Workbook_Open()
Application.Goto ("Intro Sheet")
End Sub

If I pop this in the workbook area - will the scroll lock code I have put on the sheet's own VB code list still work; it looks like this;
Code:
Private Sub Worksheet_Activate()
Worksheets("Intro Sheet").ScrollArea = "A1:A20"
End Sub

Thanks!!
Scho
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Private Sub Workbook_Open()
Sheets("Intro Sheet").activate
End sub

The goto might work as well, but I've never used it.

The worksheet_activate code will still work.

HTH
Cal
 
Upvote 0
Why not just combine them:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()
    Application.Goto [<SPAN style="color:#007F00">'Intro Sheet'!A1]</SPAN>
    ActiveSheet.ScrollArea = "A1:A20"
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

HTH,

Smitty

{Edit: Heya Cal!}
 
Upvote 0
Can do but no worries.

I do seem to be having a problem though.

I've used the basic code that Cbrine gave me but it seems to be popping up an error for no apparent reason - Is it me!!!??? :oops:

Anyway; the code;
Code:
Private Sub Workbook_Open()
Sheets("Intro Sheet").Activate
End Sub

The error window says;
Run-time erro '57121'
Application-defined or object-defined error.

I can click end and its all fine but it doesnt get rid of the fact something is wrong. I'm also a newbie at this kinda stuff and havent got a clue why its stopped working now - it worked at least once honest!!

Scho
 
Upvote 0
Well you got me there - thats the only code in the 'Thisworkbook' bit - every other bit of code is sheet relelvant as far as I know.

But it highlights that bit of code in yellow when I click the debug box.

Time for the GoTo function?? :confused:
 
Upvote 0

Forum statistics

Threads
1,213,491
Messages
6,113,963
Members
448,536
Latest member
CantExcel123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top