Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
I have a workbook with several sheets in it. However I donot want anyone to change name of one worksheet named 'Data'. He can rename other sheets. Is it possible to prevent user from changing name of one sheet? (This is because my macro will delete all sheets except the one with name 'Data'. If user changes name of 'Data' sheet, tehn macro will delete it!) Thank You Pawan |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
there's no sheetname_change event but there are several workarounds. One way would be to look at your macro and use codename instead of name. While the codename can be changed its fairly safe and of course you do have a backup don't you. the example below assumes you sheet named "Data" has a codename of sheet1 For Each Worksheet In Sheets 'If worksheet.Name < "Data" Then If Worksheet.CodeName < "Sheet1" Then Worksheet.Delete End If Next Worksheet Mike "Pawan" wrote: Hi I have a workbook with several sheets in it. However I donot want anyone to change name of one worksheet named 'Data'. He can rename other sheets. Is it possible to prevent user from changing name of one sheet? (This is because my macro will delete all sheets except the one with name 'Data'. If user changes name of 'Data' sheet, tehn macro will delete it!) Thank You Pawan |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
It worked...
Thanks Mike.. :) "Mike H" wrote: Hi, there's no sheetname_change event but there are several workarounds. One way would be to look at your macro and use codename instead of name. While the codename can be changed its fairly safe and of course you do have a backup don't you. the example below assumes you sheet named "Data" has a codename of sheet1 For Each Worksheet In Sheets 'If worksheet.Name < "Data" Then If Worksheet.CodeName < "Sheet1" Then Worksheet.Delete End If Next Worksheet Mike "Pawan" wrote: Hi I have a workbook with several sheets in it. However I donot want anyone to change name of one worksheet named 'Data'. He can rename other sheets. Is it possible to prevent user from changing name of one sheet? (This is because my macro will delete all sheets except the one with name 'Data'. If user changes name of 'Data' sheet, tehn macro will delete it!) Thank You Pawan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change of cell format if overwritten by User | Excel Worksheet Functions | |||
Can I change the user name that is registered? | Excel Discussion (Misc queries) | |||
prompt user to change source of links | Excel Discussion (Misc queries) | |||
Wait for user to change data after msgbox ???? | Excel Discussion (Misc queries) | |||
how would i change default user name all excel files | Excel Discussion (Misc queries) |