Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Php Php is offline
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_583_] Excel Programming 0 October 6th 04 10:32 AM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_582_] Excel Programming 0 October 6th 04 10:17 AM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_580_] Excel Programming 1 October 6th 04 09:30 AM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_578_] Excel Programming 0 October 5th 04 12:06 PM
How to record a sheet change showing row column sheet name and date? Simon Lloyd[_574_] Excel Programming 1 October 5th 04 11:22 AM


All times are GMT +1. The time now is 03:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"