Smithgall
Board Regular
- Joined
- May 24, 2006
- Messages
- 68
Ok i have avoided asking this because im sure it will reveal my ignorance but i have a problem.
I have asked on this board how to name a tab using a value in a cell. i got several great responses. My problem is that everytime i copy the code into my macro the macro them does not appear in my list.
Quite frankly i do not know how to open the vba editor and create code that will then appear in the macro dialogue box. I typically go to tools, record a macro, stop recording and then edit that macro by copying over that code with whatever i need. i know that seems silly but it works. I then go to the form toolbar creat a button and then assign the button to the macro. typically this works fine. however if i use the code below and then go to assign the button the macros is missing and cannot be found. What gives? i dont expect anyone to give me a full class on whats going on but maybe point me in teh right direction of what i dont seem to understand.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
ActiveSheet.Name = Mid(Target.Text, 1, 31)
End If
End Sub
I have asked on this board how to name a tab using a value in a cell. i got several great responses. My problem is that everytime i copy the code into my macro the macro them does not appear in my list.
Quite frankly i do not know how to open the vba editor and create code that will then appear in the macro dialogue box. I typically go to tools, record a macro, stop recording and then edit that macro by copying over that code with whatever i need. i know that seems silly but it works. I then go to the form toolbar creat a button and then assign the button to the macro. typically this works fine. however if i use the code below and then go to assign the button the macros is missing and cannot be found. What gives? i dont expect anyone to give me a full class on whats going on but maybe point me in teh right direction of what i dont seem to understand.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
ActiveSheet.Name = Mid(Target.Text, 1, 31)
End If
End Sub