ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro (https://www.excelbanter.com/excel-discussion-misc-queries/50524-macro.html)

Urgent

Macro
 
I have a 50 worksheet excel file. and in each of the sheets there is a
dropdown menu which has categories for that worksheet and when you click on
it it takes you to that page of that particular worksheet. All of the 50
fifty worksheet is identical except the numbers which are updated monthly.
Now what i want is that when ever i open the file i want each work sheet to
be on the first page/ or make the first selection in the drop down menu for
each work sheet.( which takes it to the first page ).
How can I do that ? I am not much of a programer so help me how to write a
macro for that thanks a zilllion in advance

Dave Peterson

I'm not quite sure I understand the question.

But are you asking how to make sure that A1 is in the top left corner of each
worksheet each time you open the workbook?

If yes, you can try this code:

Option Explicit
Sub auto_open()

Dim wks As Worksheet

Application.ScreenUpdating = False

For Each wks In ThisWorkbook.Worksheets
Application.Goto wks.Range("a1"), scroll:=True
Next wks

Worksheets("Sheet1").Select

Application.ScreenUpdating = True

End Sub

Change this Sheet1 in this line:
Worksheets("Sheet1").Select
to the worksheet name that you really want to start on.

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


Urgent wrote:

I have a 50 worksheet excel file. and in each of the sheets there is a
dropdown menu which has categories for that worksheet and when you click on
it it takes you to that page of that particular worksheet. All of the 50
fifty worksheet is identical except the numbers which are updated monthly.
Now what i want is that when ever i open the file i want each work sheet to
be on the first page/ or make the first selection in the drop down menu for
each work sheet.( which takes it to the first page ).
How can I do that ? I am not much of a programer so help me how to write a
macro for that thanks a zilllion in advance


--

Dave Peterson


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com