PC Review


Reply
Thread Tools Rate Thread

auto name each new sheet based on cell value

 
 
J.W. Aldridge
Guest
Posts: n/a
 
      25th Jun 2009
Need each new sheet's name to be based on cell value.

Should look something like this (but this one doesnt work)


Private Sub Workbook_NewSheet(ByVal Sh As Object)
Dim Ws As Worksheet
Ws.Name = Ws.Range("e2").Text
End Sub
 
Reply With Quote
 
 
 
 
J.W. Aldridge
Guest
Posts: n/a
 
      25th Jun 2009
That's ok. Found one that works. But need to change the code to use
text...

This works....

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

But, since its a date, I need this to work (cant use /'s in sheet
name)

ActiveSheet.Name = Text(E2, "mm.dd.yy").Value
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Microsoft Excel Misc 2 15th May 2010 06:49 AM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Microsoft Excel Programming 4 5th Oct 2007 04:00 PM
based on Cell/Column content ,cut one sheet's values and paste it in other sheet? mindpeace Microsoft Excel Programming 0 25th May 2006 01:33 PM
based on Cell/Column content ,cut one sheet's values and paste it in other sheet? mindpeace Microsoft Excel Programming 3 24th May 2006 03:33 PM
Excel VBA (?!)-refer to a cell on Sheet to left of X, based on criteria on Sheet X tempjones Microsoft Excel Programming 2 7th Jun 2004 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:54 PM.