G
Greg Maxey
I am trying to run a code I got from the Word VBA FAQ page:
Sub SymbolCarousel()
Select Case Selection.Fields(1).Code.Characters(29)
Case "Y"
Selection.Fields(1).Code.Characters(29) = "N"
Case "N"
Selection.Fields(1).Code.Characters(29) = "?"
Case "?"
Selection.Fields(1).Code.Characters(29) = "Y"
Case Else
End Select
End Sub
I have looked at this before and was able to make it work. For some reason
now, I keep getting a Run-Time Erro 5941 "The requested member of the
collections does not exist." This has me a bit baffled. I don't know what
a Run-Time error is really, or a member, or a colection in this case. Once
I was able to get the macro to step through and make the change after I had
toggled the display of the field codes in the document. This worked only
once however and now I get the error regardless of what I do.
A few weeks ago I made an Option Explicit statement in my module. I removed
it but, no joy.
This macro is obviously well tested or it wouldn't be of the FAQ page. Can
anyone help out and let me know what setting I must have monkey'd with to
mess this up.
Thanks.
Sub SymbolCarousel()
Select Case Selection.Fields(1).Code.Characters(29)
Case "Y"
Selection.Fields(1).Code.Characters(29) = "N"
Case "N"
Selection.Fields(1).Code.Characters(29) = "?"
Case "?"
Selection.Fields(1).Code.Characters(29) = "Y"
Case Else
End Select
End Sub
I have looked at this before and was able to make it work. For some reason
now, I keep getting a Run-Time Erro 5941 "The requested member of the
collections does not exist." This has me a bit baffled. I don't know what
a Run-Time error is really, or a member, or a colection in this case. Once
I was able to get the macro to step through and make the change after I had
toggled the display of the field codes in the document. This worked only
once however and now I get the error regardless of what I do.
A few weeks ago I made an Option Explicit statement in my module. I removed
it but, no joy.
This macro is obviously well tested or it wouldn't be of the FAQ page. Can
anyone help out and let me know what setting I must have monkey'd with to
mess this up.
Thanks.