View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
StargateFan StargateFan is offline
external usenet poster
 
Posts: 61
Default Can we use variables in XL macros?

I have little experience scripting generally, but have a lot with
AutoIt, a freeware scripting language. One of the very cool features
is the way we can use variables to make life a whole lot easier, for
example.

;=======================
$Path = "c:\windows\temp"
;=======================

Shellexecute($Path)


The advantage of the above is that it's easy to make a script that you
just plug in the changing values at the top and then not touch the
content. This is a very simpe example, but sometimes things can get
pretty complicated and using variables in this manner really
simplifies things.

Is there a comparable system in Excel so that we can put all variables
at the top and leave the rest of the script to do the tasks?

Thanks! :oD