Giving focus to a particular sheet

R

R A

Hi

Wonder if someone could offer some assistance?

When I open a workbook, I was wondering what code I would use in a macro
to give focus to one particular sheet? The sheet is called sheet1
(points for originality!)

Thankyou



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
P

Patrick Molloy

This kind of query can easily be answered by using the macro recorder and
examining the resulting script - a "must do" for anyone beginning to use VBA

sheetname = "sheet1"
Worksheets(sheetname).activate


Patrick Molloy
Microsoft Excel MVP
 

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