Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Guys...
Whats wrong with this vb... Sub renmame_sheet() Sheets("Master").Select ActiveSheet.Name = Range("b2") End Sub I get a run time 1004 "application defined or object defined" error...?? *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It should work, but could be better to change Range("B2") to Range("B2").Value.
Is there a sheet called "Master". If not, then this will cause problems. Also, is Range("B2") empty? If it is then there is no way this can work as a sheet always has to be cleed something "Darin Kramer" wrote: Guys... Whats wrong with this vb... Sub renmame_sheet() Sheets("Master").Select ActiveSheet.Name = Range("b2") End Sub I get a run time 1004 "application defined or object defined" error...?? *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks - I had the .value in, but dropped it for somereason at a later stage. Re-inserting it works perfectly :) *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HTH.
I would suggest somekind of validation in your code to make sure that Range("B2") is both populated and does not use any special characters, like Bob P refers to. Only an idea. "Darin Kramer" wrote: Thanks - I had the .value in, but dropped it for somereason at a later stage. Re-inserting it works perfectly :) *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you have invalid values in B2, such as \, ? etc.? An y value that cannot
be used in a worksheet name. -- HTH Bob Phillips "Darin Kramer" wrote in message ... Guys... Whats wrong with this vb... Sub renmame_sheet() Sheets("Master").Select ActiveSheet.Name = Range("b2") End Sub I get a run time 1004 "application defined or object defined" error...?? *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i rename a sheet if the rename tab is inactive? | Excel Worksheet Functions | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
Move data to new sheet - rename sheet based on criteria ? | Excel Discussion (Misc queries) | |||
Button to copy sheet, rename sheet sequencially. | Excel Programming | |||
how do I rename a sheet | New Users to Excel |