Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default determening sheet number

after command: Sheets.Add
is there a simple way of determining the number of the sheet just added?

-as always, thanks in advance
mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default determening sheet number


when you add a sheet it's autom. activated..
the "number" is given by the Index property

Activesheet.Index

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


mark kubicki wrote :

after command: Sheets.Add
is there a simple way of determining the number of the sheet just
added?

-as always, thanks in advance
mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default determening sheet number

You could always do

Woksheets.Add.Name ="mySheet"

and you have its name

--
HTH

Bob Phillips

"mark kubicki" wrote in message
...
after command: Sheets.Add
is there a simple way of determining the number of the sheet just added?

-as always, thanks in advance
mark




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default determening sheet number

Hi Mark,

You can also specify where you add the sheet so you already know the
position. And I have a hinkering that this delves deeper than just knowing
the Index of the sheet. Am I right?

Anyway, examples ...

Add a sheet as the first sheet:
Sheets.Add befo=Sheets(1)

Add a sheet as the last sheet:
Sheets.Add after:=Sheets(Sheets.Count)

HTH
--
Regards,
Zack Barresse, aka firefytr

"mark kubicki" wrote in message
...
after command: Sheets.Add
is there a simple way of determining the number of the sheet just added?

-as always, thanks in advance
mark




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
Compare sheet 1 column A numbers with sheet 2 column A number Not and Excel Expert Excel Worksheet Functions 3 November 20th 18 08:24 AM
Macro to lookup a sheet, number, then display in origonal sheet abbsy3 New Users to Excel 3 November 9th 10 12:19 PM
How can I refer to sheet number not sheet (name)? DK Excel Worksheet Functions 2 March 30th 09 11:06 PM
Using the Indirect function with a sheet number instead of a sheet name JDB Excel Worksheet Functions 5 December 31st 05 03:03 PM
Macro, select Sheet "Number", NOT Sheet Name DAA Excel Worksheet Functions 4 November 30th 04 05:29 PM


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

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

About Us

"It's about Microsoft Excel"