userforms and worksheet help

P

paradise

How do i write a code which allows sheet1 to be shown
first upon opening a workbook?


I have a series of userforms ranging from 1 to 10 which activates when
opening sheet1.
at Userform10, i have command button which allows user to
click and close all the forms and activate sheet 2 instead. how do i
write the code?


Thanks in advance :)
 
B

Bob Flanagan

To display sheet1 on opening the workbook:

Sub Auto_Open()
Sheets("sheet1").select
End Sub

To go to sheet2, use

Sheets("sheet2").select

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top