Set Default Worksheet in a Workbook – VBA Code

Set Default Worksheet
  • Save

Introduction/Problem Statement

In this Blog we will talk about How to set default Worksheets that show when a Workbook is open, using VBA.

Solution:

Set the default worksheet when a workbook opens.

if we open a saved Excel workbook its shows the first sheet of the workbook or the sheet that active at the time of saving. If we want to set a default worksheet that shows when the workbook opens then you may need to do some steps and then you may write the code mentioned below.

Step -1: we have to first double click on “Thisworkbook” in the VBA editor window.

Set default sheet when a workbook
  • Save

Step-2: Select Workbook in object Box and Choose the “Open” event.

Select Workbook in object Box
  • Save

 

Step-3: Write the below code Between the procedure of opening the workbook.

opening workbook
  • Save

Conclusion

This code is used for setting up the default sheet when a Workbook will open. you can use the above code to set the default sheet in the workbook when open instead default active sheet. We hope this will help you for clarification.

Don't miss out!
Subscribe To Newsletter

Get the latest Excel, VBA, Automation, Tips & Tricks, delivered straight to your inbox.

Invalid email address
Give it a try. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap