renaming worksheet

  • Thread starter Thread starter draganpi
  • Start date Start date
D

draganpi

Hi all,
anybody use calendar control to give name to a sheet.
I use simple VBA like activesheet.name = calendar.value (calendar click
renames worksheet), but after I manually rename sheet (right click on
sheet tab then rename), next time I click the calendar excell gives me
error report: error with method .value on calendar object.
Anybody had a similar problem?
 
Note: you can's use the / date seperator in a sheet name
Use the format function to use the -

Is this working for you ?

ActiveSheet.Name = Format(Calendar1.Value, "mm-dd-yyyy")
 
Yes I know that Ron,
There are something interesting, this VBA code works properly on some
computers, but on others don't. I checked if all the references were
installed, but nothing helps.
Thanks a lot anyway, I appreciate your help Ron.
regards
Dragan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top