Thread: Static Variable
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Static Variable

Todd,

Declare the variable as Public in any standard code module, above
and outside of any procedure. E.g.,

Public MyVar As Long


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Todd Huttenstine" wrote in
message ...
hey

I have a variable(number) and want it to not die until the
workbook is closed. I need to be able to see the value of
the variable from a worksheet module. How would I do this
and what module would I put the variable in?

Thank you
Todd Huttenstine