![]() |
Change sheet tab name from another sheet?
Hello! I have a problem that I need some help with. I have a woorkbook with 17 sheets and the first one is my "general" sheet. I wonder if it is possible to change e.g. the tab name on sheet 15 from a cell in my "general" sheet? Does anyone have a VBA code that could help me out? All suggestions are welcome. Thanks, /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
Change sheet tab name from another sheet?
Hi Php
Sub NameaSheet() On Error Resume Next Sheets(15).Name = Sheets("General").Range("A1").Text End Sub Errors may beraised by too long name, other sheet with that name exist, illegal characters in sheet name. HTH. Best wishes Harald "Php" skrev i melding ... Hello! I have a problem that I need some help with. I have a woorkbook with 17 sheets and the first one is my "general" sheet. I wonder if it is possible to change e.g. the tab name on sheet 15 from a cell in my "general" sheet? Does anyone have a VBA code that could help me out? All suggestions are welcome. Thanks, /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
Change sheet tab name from another sheet?
Hi Harald, Thank you for your answer, but it still does not work. Maybe I placed the code in the wrong place? Is it supposed to be under the 'ThisWorkBook' or under the specific sheets 'General' or sheet15? I have tried different places, but the thing I'm confused about is tha when I change the cell value from e.g. 1 to 5 nothing happens with sheet15 tab name. Must the code be triggered by something because sheet 15 is not the active sheet when I change the value? regards /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
Change sheet tab name from another sheet?
As is you must put the code in a standard module and run the macro manually.
If you want it to happen after typing then you call it from the worksheet's Change event. See http://www.cpearson.com/excel/events.htm on events. I can't offer a working solution, you explain this very general "to change e.g. the tab name on sheet 15 from a cell", and which sheet / which cell is of greatest importance. HTH "Php" skrev i melding ... Hi Harald, Thank you for your answer, but it still does not work. Maybe I placed the code in the wrong place? Is it supposed to be under the 'ThisWorkBook' or under the specific sheets 'General' or sheet15? I have tried different places, but the thing I'm confused about is tha when I change the cell value from e.g. 1 to 5 nothing happens with sheet15 tab name. Must the code be triggered by something because sheet 15 is not the active sheet when I change the value? regards /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
Change sheet tab name from another sheet?
Hi again! Now I think I understand why it is not working. I found this on the site you posted: "This event does not occur when the value is changed as the result of a calculation" I will try to explain more what I want to happen... On my general sheet I have 16 cells numered from 1-16. These numbers changes in the corresponding sheets when I change them. I also want the sheet tab name to change when I change numbers. All cells are calculations based on the cell were I type the first value. Cant it be done because the cell values are results of calculations? /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
Change sheet tab name from another sheet?
Hi
You have several "calculate" events in the workbook, but that would make it pretty sluggish. Can't you use the Change event in "the cell were I type the first value" ? HTH. Best wishes Harald "Php" skrev i melding ... Hi again! Now I think I understand why it is not working. I found this on the site you posted: "This event does not occur when the value is changed as the result of a calculation" I will try to explain more what I want to happen... On my general sheet I have 16 cells numered from 1-16. These numbers changes in the corresponding sheets when I change them. I also want the sheet tab name to change when I change numbers. All cells are calculations based on the cell were I type the first value. Cant it be done because the cell values are results of calculations? /Php -- Php ------------------------------------------------------------------------ Php's Profile: http://www.excelforum.com/member.php...o&userid=19971 View this thread: http://www.excelforum.com/showthread...hreadid=345792 |
All times are GMT +1. The time now is 05:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com