Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() DIM FirstSheet as String ..... your helpful code .... (not needed) Sheets(*1*).Name = "CompareX" or: FirstSheet = Sheets(1).name Jimbo213;435348 Wrote: 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 -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120857 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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.) Jimbo213 wrote: 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select number from leftmost column that has one | Excel Discussion (Misc queries) | |||
leftmost number value | Excel Discussion (Misc queries) | |||
Select Leftmost Spreadsheet | Excel Programming | |||
Delete rows with specific leftmost value | Excel Programming | |||
Leftmost and Rightmost Cell | Excel Programming |