![]() |
on open, always display sheet1
Hi
is it possible to always force a particular worksheet to be the visible active one every time the spreadsheet is opened? So for example if I have sheet1 and sheet2, and save the spreadsheet while in sheet2, the next time I open the spreadhseet, I want to force sheet1 to be the visible sheet. is there some sort of 'on-open' function I could use with a macro that directs to sheet1? thanks for any help |
on open, always display sheet1
Try this macro:
Sub Auto_open() Sheets(1).select cells(1,1).select 'If you want it to go to the A1 cell End Sub Cheers, AP "confused" wrote in message ... Hi is it possible to always force a particular worksheet to be the visible active one every time the spreadsheet is opened? So for example if I have sheet1 and sheet2, and save the spreadsheet while in sheet2, the next time I open the spreadhseet, I want to force sheet1 to be the visible sheet. is there some sort of 'on-open' function I could use with a macro that directs to sheet1? thanks for any help |
on open, always display sheet1
Hi
In Excel, go to Tools, Macro, Visual Basic Editor. Double click ThisWorkbook for your excel file. If you cannot see the excel file name, go to View, Project Explorer. In the drop down at the top which says (General) choose the Workbook option. You will be given this empty macro: Private Sub Workbook_Open() End Sub which is the macro you hope exists! Inside this put worksheets("MyworksheetName").Activate where you have already called one of your sheets "MyworksheetName". regards Paul PS if you are distributing this workbook, users may get a security warning. Tell them to go to Tools, Macro, Security. Set the protection to Medium in Security Level and in the Trusted Publishers section they need to "Trust access to visual basic project". Save the file, close it and reopen. confused wrote: Hi is it possible to always force a particular worksheet to be the visible active one every time the spreadsheet is opened? So for example if I have sheet1 and sheet2, and save the spreadsheet while in sheet2, the next time I open the spreadhseet, I want to force sheet1 to be the visible sheet. is there some sort of 'on-open' function I could use with a macro that directs to sheet1? thanks for any help |
All times are GMT +1. The time now is 06:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com