renaming worksheet
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? -- draganpi ------------------------------------------------------------------------ draganpi's Profile: http://www.excelforum.com/member.php...o&userid=33220 View this thread: http://www.excelforum.com/showthread...hreadid=530408 |
renaming worksheet
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") -- Regards Ron de Bruin http://www.rondebruin.nl "draganpi" wrote in message ... 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? -- draganpi ------------------------------------------------------------------------ draganpi's Profile: http://www.excelforum.com/member.php...o&userid=33220 View this thread: http://www.excelforum.com/showthread...hreadid=530408 |
renaming worksheet
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 -- draganpi ------------------------------------------------------------------------ draganpi's Profile: http://www.excelforum.com/member.php...o&userid=33220 View this thread: http://www.excelforum.com/showthread...hreadid=530408 |
All times are GMT +1. The time now is 07:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com