RE: Execute error: Type Mismatch: 'Execute'
- From: Old Pedant <OldPedant@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Aug 2008 11:52:01 -0700
"kellym@xxxxxxxxxxxxxxxxxxxx" wrote:
I'm in the process of writing a vbscript that uses KixForms as a GUI
frontend.
According to a number of web pages (and this group) it is possible to
to use it as follows;
...
Do While Form1.Visible
Execute(Form1.DoEvents)
Loop
Ummm...I'm more than a little confused here.
According to the VBS docs
http://msdn.microsoft.com/en-us/library/03t418d2(VS.85).aspx
the Execute *statement* will execute a *string*, only.
So unless Form1.DoEvents is a string, I don't see how that code works, at all.
Perhaps you could try
MsgBox Form1.DoEvents
to see what string Execute is attempting to work with?
********
A couple of minor points (that shouldn't affect the way the code runs):
(1) You are doing
Form1.Visible = "True"
But the Visible property is a BOOLEAN value, *not* a string. Yes, VBS will
convert the string to boolean for you, but it would be better to code
Form1.Visible = True
(2) You should not use parentheses with the EXECUTE statement. They don't
hurt, because any expression is still an expression when enclosed in parens,
but they can have weird side effects in other usages. So just as a matter of
practice, avoid them where they aren't required.
******************
This is *PURELY* a hunch on my part, but I can't help but wonder if you
shouldn't simply eliminate the EXECUTE and do
Do While Form.Visible
Form.DoEvents
Loop
.
- Follow-Ups:
- Re: Execute error: Type Mismatch: 'Execute'
- From: kellym
- Re: Execute error: Type Mismatch: 'Execute'
- References:
- Execute error: Type Mismatch: 'Execute'
- From: kellym
- Execute error: Type Mismatch: 'Execute'
- Prev by Date: Re: How to Randomize characters in a string
- Next by Date: Re: What does the .run method return
- Previous by thread: Execute error: Type Mismatch: 'Execute'
- Next by thread: Re: Execute error: Type Mismatch: 'Execute'
- Index(es):
Relevant Pages
|