View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default code to select first sheet

sheets(1).select

Maybe...

Judy Ward wrote:

I export several sheets from Access to an Excel workbook and run a macro that
formats each of the sheets (bolds and centers titles, sets column widths,
etc.). When the macro is done, it leaves the focus on the last sheet of the
workbook. I want the focus to be on the first sheet. All of the sheets have
names (not just Sheet1, Sheet2), but I don't want to hard-code the sheet name
because it could change.

Sheets("Sheet1").Select does not work. Is there a generic way to refer to
Sheet1 (that has been renamed)?

Thank you,
Judy


--

Dave Peterson