How to find .Name of leftmost worksheet tab

  • Thread starter Thread starter Jimbo213
  • Start date Start date
J

Jimbo213

A workbook is created by another application.
I want to find the first [leftmost] worksheet name - and it is always
different
The second sheet is named Sheet1
The third sheet is named Sheet2
The fourth sheet is named Sheet3

It may be safe to assume that this is really "sheet 4" that has been
renamed, but I'd prefer to have a solution that finds the leftmost tab .Name
positionally.

DIM FirstSheet as String
..... your helpful code ....
Sheets(FirstSheet).Name = "CompareX"

Thanks for your reply & assistance.
Jimbo213
 
sheets(1).name = "CompareX"
or
worksheets(1).name = "CompareX"

There could be a difference.

If that first sheet is a non-worksheet (like a chartsheet), you'll see.)

A workbook is created by another application.
I want to find the first [leftmost] worksheet name - and it is always
different
The second sheet is named Sheet1
The third sheet is named Sheet2
The fourth sheet is named Sheet3

It may be safe to assume that this is really "sheet 4" that has been
renamed, but I'd prefer to have a solution that finds the leftmost tab .Name
positionally.

DIM FirstSheet as String
.... your helpful code ....
Sheets(FirstSheet).Name = "CompareX"

Thanks for your reply & assistance.
Jimbo213
 
Back
Top