![]() |
![]() |
|
|||||||
| 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: Mar 2002
Posts: 83
|
I know this is a simple one .. but I cant find the answer in here using search .. so I've got to ask this question ..
I want to run a macro that gets the current worksheet name from the tab at the bottom and then changes it to a set string eg; "balance" I know its simple .. but I dont know how to read the current worksheet name and change it .. cos the user may have manually changed the tab name. Secondly .. is there a way of stopping the users from changing sheet tab names ? Thanks Bill |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
To answer your first question:
If ActiveSheet.Name <> "balance" Then ActiveSheet.Name = "balance"
__________________
Kind regards, Al Chara |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
To answer your second question:
Go to tools|options|view tab|uncheck "Sheet tabs" Now the user can't see the sheet tabs, but he/she can cycle through them by pressing ctrl+PageUp or ctrl+PageDown...not sure if that is what you are looking for.
__________________
Kind regards, Al Chara |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 83
|
Thanks guys for your help .. I now know how to check & change tab names.
I think hiding the tabs and making the users use contol keys to change tabs would irritate them .. but thanks for the suggestion .. Is there no VB code I can use to disable changing of the tab name ? |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|