Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Close msgbox after making selection

Hi Peter, In the version of xl03 that I am running, the msgbox goes away,
whether or not ScreenUpdating is enabled. Is it different in xl07 + ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually tested
the code you posted as an example, at least not exactly as written and
with nothing else.

My guess is you are showing the msgbox with screenupdating disabled. The
msgbox will stay on the screen indefinitely until the screen is refreshed
(even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when showing
a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?


No

The standard message box automatically closes when a button is clicked.
If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.


Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Close msgbox after making selection

Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in xl07 +
?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually tested
the code you posted as an example, at least not exactly as written and
with nothing else.

My guess is you are showing the msgbox with screenupdating disabled. The
msgbox will stay on the screen indefinitely until the screen is refreshed
(even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is clicked.
If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith







  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Close msgbox after making selection

Forgot to mention I get same results in 2003 & 2007

Peter T

"Peter T" <peter_t@discussions wrote in message
...
Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in xl07
+ ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually
tested the code you posted as an example, at least not exactly as
written and with nothing else.

My guess is you are showing the msgbox with screenupdating disabled. The
msgbox will stay on the screen indefinitely until the screen is
refreshed (even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is
clicked. If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith









  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Close msgbox after making selection

Nope, As soon as I click the button, the shape dialog box disappears. I
cannot get it to remain on screen after the button is clicked and cannot get
any further code to process without clicking the button. I believe that is
the designed performance.



"Peter T" <peter_t@discussions wrote in message
...
Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in xl07
+ ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually
tested the code you posted as an example, at least not exactly as
written and with nothing else.

My guess is you are showing the msgbox with screenupdating disabled. The
msgbox will stay on the screen indefinitely until the screen is
refreshed (even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is
clicked. If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Close msgbox after making selection

Indeed it is normal behaviour for the code to be suspended until the msgbox
is dismissed. But are you saying with screenupdating disabled the "image" of
the msgbox completely disappears from the screen after clicking OK.

Regards,
Peter T

"JLGWhiz" wrote in message
...
Nope, As soon as I click the button, the shape dialog box disappears. I
cannot get it to remain on screen after the button is clicked and cannot
get any further code to process without clicking the button. I believe
that is the designed performance.



"Peter T" <peter_t@discussions wrote in message
...
Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in xl07
+ ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually
tested the code you posted as an example, at least not exactly as
written and with nothing else.

My guess is you are showing the msgbox with screenupdating disabled.
The msgbox will stay on the screen indefinitely until the screen is
refreshed (even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is
clicked. If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith













  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Close msgbox after making selection

Peter, That's what I'm saying. I tried the code you provided. I tried it
with and without Parentheses, with and without vbSystemModal and several
types of buttons and in default mode. It stops all activity until a button
is clicked and once the button is clicked, the dialog box disappears. I
cannot reproduce the effect you describe.


"Peter T" <peter_t@discussions wrote in message
...
Indeed it is normal behaviour for the code to be suspended until the
msgbox is dismissed. But are you saying with screenupdating disabled the
"image" of the msgbox completely disappears from the screen after clicking
OK.

Regards,
Peter T

"JLGWhiz" wrote in message
...
Nope, As soon as I click the button, the shape dialog box disappears. I
cannot get it to remain on screen after the button is clicked and cannot
get any further code to process without clicking the button. I believe
that is the designed performance.



"Peter T" <peter_t@discussions wrote in message
...
Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in
xl07 + ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually
tested the code you posted as an example, at least not exactly as
written and with nothing else.

My guess is you are showing the msgbox with screenupdating disabled.
The msgbox will stay on the screen indefinitely until the screen is
refreshed (even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is
clicked. If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith













  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Close msgbox after making selection

Well how strange! Actually this issue crops up from time to time and AFAIK
the cause is slays as I suggested, namely a msgbox can appear to remain on
the screen after being dismissed if screen updating is disabled. I can
easily recreate that effect, in all versions.

Regards,
Peter T

"JLGWhiz" wrote in message
...
Peter, That's what I'm saying. I tried the code you provided. I tried it
with and without Parentheses, with and without vbSystemModal and several
types of buttons and in default mode. It stops all activity until a
button is clicked and once the button is clicked, the dialog box
disappears. I cannot reproduce the effect you describe.


"Peter T" <peter_t@discussions wrote in message
...
Indeed it is normal behaviour for the code to be suspended until the
msgbox is dismissed. But are you saying with screenupdating disabled the
"image" of the msgbox completely disappears from the screen after
clicking OK.

Regards,
Peter T

"JLGWhiz" wrote in message
...
Nope, As soon as I click the button, the shape dialog box disappears. I
cannot get it to remain on screen after the button is clicked and cannot
get any further code to process without clicking the button. I believe
that is the designed performance.



"Peter T" <peter_t@discussions wrote in message
...
Try this

Sub abc()
' run with alt-F8
Dim a

'Application.ScreenUpdating = False

MsgBox ("Move me away from the centre of the screen")

Application.ScreenUpdating = False
For i = 1 To 100
a = 1
Next i
MsgBox ("done")
Application.ScreenUpdating = True
End Sub

Regards,
Peter T


"JLGWhiz" wrote in message
...
Hi Peter, In the version of xl03 that I am running, the msgbox goes
away, whether or not ScreenUpdating is enabled. Is it different in
xl07 + ?


"Peter T" <peter_t@discussions wrote in message
...
What you describe cannot and occur. I very much doubt you actually
tested the code you posted as an example, at least not exactly as
written and with nothing else.

My guess is you are showing the msgbox with screenupdating disabled.
The msgbox will stay on the screen indefinitely until the screen is
refreshed (even DoEvents) or by re-enabling screenupdating.

Be sure to temporarily disable screenupdating if/as necessary when
showing a msgbox.

Regards,
Peter T

The only thing that
"John Keith" wrote in message
...
Is this a message box that was created with a UserForm?

No

The standard message box automatically closes when a button is
clicked. If it is the
standard message box and is not closing, there could be a software
problem
in your system. Is this in Excel, if so, what version.

Excel 2007/WinXP

The message box window stays open until the next msgbox command is
executed.

I also just tried the following

msgbox("Test")
for i =1 to 100000000
a=1
next i
msgbox("done")

The loop has not completed yet and the first message box is still
open.





John Keith















Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Msgbox Close with vba art Excel Programming 10 November 20th 08 01:23 PM
close msgbox Dan Excel Programming 4 July 30th 07 07:40 PM
Close msgbox ? Buddy Lee Excel Programming 3 November 22nd 05 04:14 PM
Close a MsgBox Taffy[_2_] Excel Programming 6 October 4th 04 09:39 PM
Making a Msgbox popup Todd Huttenstine[_2_] Excel Programming 5 December 28th 03 10:49 PM


All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"