View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike-hime Mike-hime is offline
external usenet poster
 
Posts: 14
Default More questions about variables and procedures...

I was under the impression that you are correct... but even though I have
coded it that way, after I run a procedure if I try to run it agian, it will
cause an error saying that my variables aren't defined. It seems buggy to
me.

"TerryK" wrote in message
...
If you declare your variables as Public in the General Declarations (not

within a module) the values will be retained after the code runs.

ie

Public SomeVariable as Integer

Sub Some_Sub()
--Your code here
end sub

Hope that gets you what you need.
TerryK