Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JackR
 
Posts: n/a
Default Naming The Tabsheet from a cell

I have this routine that I am runing, but the problem is it changes all the
tabs on every sheet, how can I have only change the tab for the sheet I am
working on?

Here is what I am using

Sub nametab()
Dim i As Integer
On Error Resume Next
For i = 1 To Sheets.Count
Sheets(i).Name = Sheets(i).Range("G1").Value
Next i
On Error GoTo 0

Any help would be great.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Naming The Tabsheet from a cell

sub rename()
ActiveSheet.Name = Range("G1").Value
end sub

HTH
--
AP

"JackR" a écrit dans le message de
...
I have this routine that I am runing, but the problem is it changes all

the
tabs on every sheet, how can I have only change the tab for the sheet I am
working on?

Here is what I am using

Sub nametab()
Dim i As Integer
On Error Resume Next
For i = 1 To Sheets.Count
Sheets(i).Name = Sheets(i).Range("G1").Value
Next i
On Error GoTo 0

Any help would be great.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Naming The Tabsheet from a cell

Jack,

Try

ActiveSheet.Name = ActiveSheet.Range("G1").Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"JackR" wrote in message
...
I have this routine that I am runing, but the problem is it
changes all the
tabs on every sheet, how can I have only change the tab for the
sheet I am
working on?

Here is what I am using

Sub nametab()
Dim i As Integer
On Error Resume Next
For i = 1 To Sheets.Count
Sheets(i).Name = Sheets(i).Range("G1").Value
Next i
On Error GoTo 0

Any help would be great.



  #4   Report Post  
Posted to microsoft.public.excel.misc
JackR
 
Posts: n/a
Default Naming The Tabsheet from a cell

Thank you, that worked. I appreciate the help

"Chip Pearson" wrote:

Jack,

Try

ActiveSheet.Name = ActiveSheet.Range("G1").Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"JackR" wrote in message
...
I have this routine that I am runing, but the problem is it
changes all the
tabs on every sheet, how can I have only change the tab for the
sheet I am
working on?

Here is what I am using

Sub nametab()
Dim i As Integer
On Error Resume Next
For i = 1 To Sheets.Count
Sheets(i).Name = Sheets(i).Range("G1").Value
Next i
On Error GoTo 0

Any help would be great.




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
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
What is wrong with naming a cell as c? vezerid Excel Discussion (Misc queries) 4 January 31st 06 08:57 PM
Dates of a Day for a month & year cell formulas mikeburg Excel Discussion (Misc queries) 2 December 29th 05 10:14 PM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Naming a cell mike Excel Worksheet Functions 2 January 12th 05 11:31 PM


All times are GMT +1. The time now is 08:21 PM.

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

About Us

"It's about Microsoft Excel"