Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to find .Name of leftmost worksheet tab


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to find .Name of leftmost worksheet tab


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to find .Name of leftmost worksheet tab

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select number from leftmost column that has one widman Excel Discussion (Misc queries) 4 April 29th 10 02:05 AM
leftmost number value sandy Excel Discussion (Misc queries) 1 April 27th 10 02:53 AM
Select Leftmost Spreadsheet Whicks Excel Programming 10 April 25th 08 04:00 PM
Delete rows with specific leftmost value CLR Excel Programming 2 November 20th 04 02:02 AM
Leftmost and Rightmost Cell Lena[_3_] Excel Programming 3 April 7th 04 03:51 PM


All times are GMT +1. The time now is 09:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"