LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Storing Variables

Hey guys,

I always use cells in a sheet to store variables, usualy the active sheet.
However, I am finding that as I create more and more programs and attempt to
expand them for more usability, that I am running into problems where my
variables are getting in the way. In most cases, in order for me to expand
usability/features of my programs, I am having to move my variables so the
code I write does not overwrite them. This takes time because I have to
then go all through the entire code and specifiy the new cell location of
the variable. This increases the probability that I will make a mistake,
and then my code will not work.

There has to be some other way or alternative...
Is there anyway I can store variables in a module or something in the actual
VBA code instead of cells in a worksheet. I still will use some cells in a
worksheet to store variables(theres no way around that), but I would also
like to have them stored in a module or something in my actual VBA code.

For instance, I have a value in cell A1 that changes based on certain
conditions, and I use this value as a reference for other functions in my
VBA code. Is there a way to have this value(variable) stored somewhere in a
module where I can simply reference that module variable instead of always
having to reference the actual cell to find the value? This way if I need
to put something in cell A1, I can without having to move the variable in
cell A1 and then having to go all throughout my code and re-specifiy where
to look for that variable.

I hope this is clear.

Thanx in advance
Todd Huttenstine


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
storing macros ? Tim[_7_] Excel Discussion (Misc queries) 2 October 26th 07 02:54 AM
Storing a value to variable CLamar Excel Discussion (Misc queries) 0 June 16th 06 04:46 PM
Storing Formulas to Use NEWB Excel Worksheet Functions 3 December 2nd 05 05:23 PM
Storing data Bob Mckenzie New Users to Excel 3 July 30th 05 07:33 PM
Storing Values dinesh Excel Discussion (Misc queries) 0 June 10th 05 06:33 AM


All times are GMT +1. The time now is 03:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"