Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

How to name the list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Toman - 21 Feb 2006 09:19 GMT
Hello guys
I need help. I am trying to write my first VBA code. First complicatio
has already occured :-).
I want to name the list after cell, including cell´s forma
(00"/"0000"/"00)

I use this simple code but doesn´t work properly:

Private Sub CommandButton2_Click()
ActiveSheet.Name = ActiveSheet.Range("B1").Value
End Sub

For instance: The cell has content : 05/4103/01 and I need to get thi
into List´s name field.

My procedure returns only 5410301 as a List name

Thank you for your advice
Norman Jones - 21 Feb 2006 09:37 GMT
Hi Toman

The slash (/) is not a legal sheet name character.

Changing the slash for (say) a hyphen, your code worked for me.

---
Regards,
Norman

> Hello guys
> I need help. I am trying to write my first VBA code. First complication
[quoted text clipped - 14 lines]
>
> Thank you for your advices
Norman Jones - 21 Feb 2006 09:47 GMT
Hi Toman,

> Changing the slash for (say) a hyphen, your code worked for me.

Or, more explicitly:

   ActiveSheet.Name =  _
           Format(ActiveSheet.Range("B1").Value, "00-0000-00")

---
Regards,
Norman
Toman - 21 Feb 2006 10:37 GMT
Thank you guys.
Now it is working perfectly;)

Signature

Toman

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.