Re: Please Help

Tech-Archive recommends: Fix windows errors by optimizing your registry



strmsg1 = "Message 1"
strmsg2 = "Message 2"
strmsg3 = "Message 3"

Do Until x = 3
x = x + 1
strtext = "strmsg" & x
WScript.Echo strtext
loop

Do Until y = 3
y = y + 1
strtext = Eval("strmsg" & y)
WScript.Echo strtext
loop


--

Bill James


"srp1877" <srpjunk@xxxxxxxxxxx> wrote in message news:1174329639.289199.19620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello

Please could somebody help me with the following script when I run it
I get the output below when I actually want it to display the 3
messages. where am I going wrong?

strmsg1 = "Message 1"
strmsg2 = "Message 2"
strmsg3 = "Message 3"
Do Until x = 3
x = x + 1
strtext = "strmsg" & x
WScript.Echo strtext
loop

Output
strmsg1
strmsg2
strmsg3

Thanks

Simon

.



Relevant Pages

  • Re: How to implement the progress bar to indicate the Macro start to f
    ... Sub StatusProgressBar(lCounter As Long, _ ... Optional strText As String, _ ... 'lCounter the loop counter passed from the procedure ... Static lOldStripes As Long ...
    (microsoft.public.excel.programming)
  • Re: How to implement the progress bar to indicate the Macro start to f
    ... Sub StatusProgressBar(lCounter As Long, _ ... Optional strText As String, _ ... 'lCounter the loop counter passed from the procedure ... Static lOldStripes As Long ...
    (microsoft.public.excel.programming)
  • Re: Multiple IIf
    ... Just always add the " OR " and strip off 4 characters at the end ... strText = Left- 4) ... You could probably use a loop to loop through the controls that have similar ... txt boxes for a date range and 8 chk boxes to specify which ...
    (microsoft.public.access.reports)
  • Re: string is interperted literally
    ... loop though a recordset and I dont know the field names, ... StrText is interperted as string ... You mention "StrText is interperted as string". ...
    (comp.databases.ms-access)
  • Re: Find and Replace question
    ... So some sort of loop. ... from the variable strText and you take the result in the variable ... variable (strNewText) each time, passing it as an argument in the Replace ... can look at using an array. ...
    (microsoft.public.dotnet.languages.vb)