ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   msgbox to NOT display OK Button and to run while saving? (https://www.excelbanter.com/excel-programming/367174-msgbox-not-display-ok-button-run-while-saving.html)

Corey

msgbox to NOT display OK Button and to run while saving?
 
With the code below i want to see if i can have the file SAVING WHILE the
msgbox is being displayed, not
to START Saving once the KK button is clicked.

Is this possible??

Code(Part of):
res = MsgBox("Saving file this file may take a few Seconds, Please
wait....", , "Msgbox Title")
ActiveWorkbook.Save ' <========== Want this to occur DURING the msgbox being
Displayed, AND no OK Button on the MsgBox.
Application.Quit
End Sub

regards

Corey....



Andrew B[_5_]

msgbox to NOT display OK Button and to run while saving?
 
Hi Corey
I think the message box is designed to wait for a response. Two other
ways to do what you want:
1. Create a simple userform, which comes on like a splash screen then
can be removed when you want.

2. Write your message in the status bar across the bottom of the screen.

HTH

Andrew Bourke

Corey wrote:
With the code below i want to see if i can have the file SAVING WHILE the
msgbox is being displayed, not
to START Saving once the KK button is clicked.

Is this possible??

Code(Part of):
res = MsgBox("Saving file this file may take a few Seconds, Please
wait....", , "Msgbox Title")
ActiveWorkbook.Save ' <========== Want this to occur DURING the msgbox being
Displayed, AND no OK Button on the MsgBox.
Application.Quit
End Sub

regards

Corey....



Leith Ross[_653_]

msgbox to NOT display OK Button and to run while saving?
 

Hello Corey,

The MsgBox is modal (locks out Excel until it is finished). The signal
to the system togive control back to Excel is when you click a button.
The MsgBox displays "OK" as the default.

You can achieve your goal by creating a UserForm instead. The form will
remain until you close it from your code routine. If you are concerned
that a user might click the Close Box on the form and interrupt your
save, you can disable it using a few API calls. I have the code to do
this if you need it.


--
Leith Ross


------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=561332


Corey

msgbox to NOT display OK Button and to run while saving?
 
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only saves
if i click the X.

Corey....



NickHK

msgbox to NOT display OK Button and to run while saving?
 
Corey
UserForm2.Show,vbModeless ?

NickHK

"Corey" wrote in message
...
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only saves
if i click the X.

Corey....





Corey

msgbox to NOT display OK Button and to run while saving?
 
Nick,
Thnaks.
I get an error.What do i place in the "?" ??


"NickHK" wrote in message
...
Corey
UserForm2.Show,vbModeless ?

NickHK

"Corey" wrote in message
...
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only
saves
if i click the X.

Corey....







witek

msgbox to NOT display OK Button and to run while saving?
 
Corey wrote:
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only saves
if i click the X.


I put a code which do this a few weeks ago.

NickHK

msgbox to NOT display OK Button and to run while saving?
 
Corey,
That was just to indicate that I was not sure it would solve you problem.
It's not code. Delete it.

NickHK

"Corey" wrote in message
...
Nick,
Thnaks.
I get an error.What do i place in the "?" ??


"NickHK" wrote in message
...
Corey
UserForm2.Show,vbModeless ?

NickHK

"Corey" wrote in message
...
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only
saves
if i click the X.

Corey....









Bob Phillips

msgbox to NOT display OK Button and to run while saving?
 
Corey,

Do the Save from within the userform code, when it is activated say, not in
the main code.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Corey" wrote in message
...
UserForm2.Show
ActiveWorkbook.Save
UserForm2.Hide

Thanks for the reply.

I placed a userform in the code to state the file is saving.
No buttons on it.
But how do i get it to save while it is displayed, it currently only saves
if i click the X.

Corey....






All times are GMT +1. The time now is 03:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com