View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default How to name the list

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


"Toman" wrote in
message ...

Hello guys
I need help. I am trying to write my first VBA code. First complication
has already occured :-).
I want to name the list after cell, including cellīs format
(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 this
into Listīs name field.

My procedure returns only 5410301 as a List name


Thank you for your advices


--
Toman
------------------------------------------------------------------------
Toman's Profile:
http://www.excelforum.com/member.php...o&userid=31397
View this thread: http://www.excelforum.com/showthread...hreadid=514795