View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] robotman@gmail.com is offline
external usenet poster
 
Posts: 73
Default Increment a variable?

Is there a way to write a function to increment a variable (i.e. to
replace "myvar = myvar + 1")?

For example, I would like to create a custom function called "inc" so I
can do:

inc myvar

This would require somehow passing a variable name to the function
(which I don't see how is possible).

Any other ideas how to get around the "myvar = myvar + 1" ?

Thanks!