![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Apr 2002
Posts: 19
|
One of those problems..
Is it better to reference a worksheet by its tab number on a MAC rather than pass the actual name?(use Worksheets(index) and not Worksheets("Menu"))? if so how do i find the index number of a worksheet..Excel documentation says that the index property is good only on Excel 97 thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
There are two trains of thought on the worksheet reference.
1. Use the worksheet tab name i.e. Sheets("Sheet1").Range("A1"). blah blah... because people seldom change the names of worksheets. (not great logic, but logic none the less) This is my preferred method anyway. 2. Use the programmatic name i.e. Sheet1.Range("A1"). blah blah, because people can't change this name. However, if you were to delete Sheet1 and later created a new version of that worksheet, it's probably not going to be Sheet1. This is why I personally don't like this method. I could be wrong (because I'm too lazy to check and someone will correct me), but the Item property of the sheet is basically the order of the sheets in the workbook from left to right, including hidden sheets. You can reference a sheet using the item number as Sheets(1), I think. HTH PS. MAC specific problems, I have no idea, but hopefully I've answered your real question. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|