Workbook_Open Issues

Pavertheway

New Member
Joined
Nov 5, 2018
Messages
47
Hi,

I want to run two operations through the Workbook_Open string at the same time but can't get it to work correctly.

I currently have;
Code:
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("START").Visible = xlVeryHidden
Application.EnableEvents = True
End Sub
Which works exactly how I want it to, except it can still open on the sheet the workbook was saved on.
I usually use:
Code:
Private Sub Workbook_Open()
Sheets("Sheet1").Select
Range("A1").Select
End Sub

To get a workbook to open on a specific sheet but I cannot seem to get them to work together - is there something I am missing/doing wrong?

Thanks in advance!
 
Last edited by a moderator:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Have you tried just adding:

Code:
Sheets("Sheet1").Select
Range("A1").Select

to the end of the first routine, before the End Sub?
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,980
Members
449,201
Latest member
Lunzwe73

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