uh, ok, sorry for not being crystal clear...

After using the variable declaration method with Static, that can declare a variable used through let's say a form, the variable is only declared once and it becomes available through the whole form. (lookup "Static" for more info)

Anyways,

I was wondering,

Is there a new way to execute a bunch of code, only once even if it's in a loop?

my previous code:
VB Code:
  1. Do
  2. a += 1
  3. b += 2 + a
  4. (The Function)
  5.    c = b
  6. (Footer of function)
  7. Loop Until a = 50

Meaning the c variable will be grabbed ONCE in the loop, regardless of the values changing in the 2nd, 3rd, etc loop.

I think hope it's all clear now...

I know I could use a flag method with an IF to do that, but I'm just exploring new functions...