Re: Help: Why don't SUBs execute instantly?
- From: "Mike Williams" <Mike@xxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Feb 2006 10:37:28 -0000
<cenozoite@xxxxxxxxxx> wrote in message news:1140822846.271653.199540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Why doesn't it do that automatically? Telling it text1.text
= something should cause it to automatically change the
contents of that text box right away, before moving on
with the next line of code.
It *does* change the contents of the text box immediately, but it doesn't actually display those new contents on the screen until the text box gets a chance to refresh itself, which in your specific example code will be after the loop has terminated. You cane see this by doing:
Dim n As Long
Text1.Text = "Hello"
Me.Caption = Text1.Text
For n = 1 To 100000000
Next n
Me.Print "Done"
If you want the TextBox to refresh itself before your loop (or whatever) is entered then you need to explicitly tell it to do so, as in Text1.Refresh. Just jumping up and down and saying, "It's wrong, it shouldn't be like that" isn't actually gonna change things. It's like jumping on the bus to Liverpool and moaning all the time about the fact that it isn't going to Manchester. If you don't like it then get on a different bus ;-)
Mike
.
- Follow-Ups:
- Re: Help: Why don't SUBs execute instantly?
- From: cenozoite
- Re: Help: Why don't SUBs execute instantly?
- References:
- Help: Why don't SUBs execute instantly?
- From: cenozoite
- Re: Help: Why don't SUBs execute instantly?
- From: neilanessa
- Re: Help: Why don't SUBs execute instantly?
- From: Rick Rothstein [MVP - Visual Basic]
- Re: Help: Why don't SUBs execute instantly?
- From: cenozoite
- Help: Why don't SUBs execute instantly?
- Prev by Date: Re: dealing with currencies and different locales....
- Next by Date: Re: Maximize Issues
- Previous by thread: Re: Help: Why don't SUBs execute instantly?
- Next by thread: Re: Help: Why don't SUBs execute instantly?
- Index(es):
Relevant Pages
|