![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 85
|
I am trying to figure out how I can name a worksheet(as an object) allow the user to change the sheet name and still be able to call the worksheet by the original name that I gave it. For example if you look in the project explorer you can name the worksheet in the "properties" window but you can also name the sheet by renaming the tab in the workbook in Excel's main window.
|
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
You can refer to the sheet by it's index number:
Code:
sheets(1) Code:
sheet1 _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-05-03 08:36 ] |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Try using the CodeName property of the Worksheet object.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|