Re: Can we use variables in XL macros?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



sure:

DIM sPath as String
sPath = "c:\windows\temp"
Shell sPath

"StargateFan" <IDon'tAcceptSpam@xxxxxxxxxxxxxx> wrote in message news:728a25lttp5imtag0pbk02b3n08g13jl1j@xxxxxxxxxx
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

.



Relevant Pages

  • Re: Getting path...
    ... > The post asked about the full name of a script not a URL; ... robustness for the sake of code robustness, but robustness for the sake of ... > Dim sPath ... however one needs to exert more brain cells to see the meaning. ...
    (microsoft.public.scripting.wsh)
  • Re: Automate FTP
    ... Thank you for your quick reply, however the first line of the script is ... "Steven Burn" wrote: ... > Dim sPath As String, ... > | that are transfered in an FTP session. ...
    (microsoft.public.vb.general.discussion)
  • Re: webpage fails due to pop-up window blocked
    ... I've seen Norton implement script blocking features below that broke other ... access important web pages because I get a message saying "a pop-up widow ...
    (microsoft.public.win2000.setup_deployment)
  • Re: Finding line numbers of HTML elements
    ... but mostly because the context of application significantly ... contexts in which a script erroring-out at runtime would be considered ... features is employed) and propose superficial and stupid responses to ... practice designing for clean-degradation in response to negative results ...
    (comp.lang.javascript)
  • Re: what is the best way to determine system OS?
    ... If you watch a typical autoconf script, ... >knowing which features you're looking for, I can't say how you would ... >"better" distribution that you already support, ...
    (comp.lang.python)