View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default unwanted reinitialization of global variables

For testing you can declare these string as constants (with values of "a",
"b" etc) and see where/when the values are being reassigned, as an error
will occur.
Or use the Watch window to see when the values change.

However, I suspect you really do have an End or are resetting, as Dave
suggested, though.

Depending on what you are doing, you could use the Const approach, they
format the cell(s) with the Symbol font.

NickHK

wrote in message
oups.com...
Dave,

Thanks for your response. I like the idea of adding the
initializevars routine. I will definitely add that.

As for why they are getting reinitialized to begin with, I'm still not
sure. I checked all my End statements and none of them are just plain
End. All of them are End With, End If, End Sub, etc. Also, I did not
hit the Reset button. Any other ideas?

- Mary