![]() |
Function that returns worksheet name and updates on rename.
I have built a function that reads the name of a worksheet and displays it in
the cell. Once you rename the worksheet, however, the function does not update. Does anyone know how to invoke the updating of this function when the event of renaming the sheet occurs? Also, I would like to use this same function on many different worksheets so it can't look update the functions on all sheets with the name of the one activesheet. Thanks, joe |
Function that returns worksheet name and updates on rename.
Public Function wname()
Application.Volatile wname = Application.Caller.Parent.Name End Function -- Regards, Tom Ogilvy "jr" wrote in message ... I have built a function that reads the name of a worksheet and displays it in the cell. Once you rename the worksheet, however, the function does not update. Does anyone know how to invoke the updating of this function when the event of renaming the sheet occurs? Also, I would like to use this same function on many different worksheets so it can't look update the functions on all sheets with the name of the one activesheet. Thanks, joe |
Function that returns worksheet name and updates on rename.
It works great. Thanks.
"Tom Ogilvy" wrote: Public Function wname() Application.Volatile wname = Application.Caller.Parent.Name End Function -- Regards, Tom Ogilvy "jr" wrote in message ... I have built a function that reads the name of a worksheet and displays it in the cell. Once you rename the worksheet, however, the function does not update. Does anyone know how to invoke the updating of this function when the event of renaming the sheet occurs? Also, I would like to use this same function on many different worksheets so it can't look update the functions on all sheets with the name of the one activesheet. Thanks, joe |
Function that returns worksheet name and updates on rename.
You can do this with worksheet functions:
http://www.mcgimpsey.com/excel/formu..._function.html In article , "jr" wrote: I have built a function that reads the name of a worksheet and displays it in the cell. Once you rename the worksheet, however, the function does not update. Does anyone know how to invoke the updating of this function when the event of renaming the sheet occurs? Also, I would like to use this same function on many different worksheets so it can't look update the functions on all sheets with the name of the one activesheet. Thanks, joe |
All times are GMT +1. The time now is 08:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com