The_Captian
New Member
- Joined
- Nov 18, 2011
- Messages
- 8
Using Excel 2003 SP0
I created a variable called "comment" as a string. Later realized that "Comment" was a method I needed to use, so I changed the variable name to "myComment".
However, now every I try to use ".Comment" the VBA editor changes it to ".comment" and gives an object variable not defined error.
for example, the code:
Sheets("S1").Range(myCell).Comment.Shape.TextFrame.AutoSize = True
is changed to:
Sheets("S1").Range(myCell).comment.Shape.TextFrame.AutoSize = True
and errors.
Is there a way to force a reset of the VBA editor. I have tried closing, re-starting etc. but it refuses to let me use "Comment" as a method.
Thanks in advance for any replies.
I created a variable called "comment" as a string. Later realized that "Comment" was a method I needed to use, so I changed the variable name to "myComment".
However, now every I try to use ".Comment" the VBA editor changes it to ".comment" and gives an object variable not defined error.
for example, the code:
Sheets("S1").Range(myCell).Comment.Shape.TextFrame.AutoSize = True
is changed to:
Sheets("S1").Range(myCell).comment.Shape.TextFrame.AutoSize = True
and errors.
Is there a way to force a reset of the VBA editor. I have tried closing, re-starting etc. but it refuses to let me use "Comment" as a method.
Thanks in advance for any replies.