Regouin
05-11-2005, 01:50 AM
Hello everyone,
And yet I have another problem. I have a workbook which completely hides excel and only uses it in the background (so not viewable to the user). I have a button labeled close on the menu and I want it to save and quit. Well the save and quit part is easy, but here is the trick. While saving I want a dialog box to appear which tells the user that the program is busy saving (to prevent the user from starting to press buttons because the user thinks that the program stopped responding, saving takes a considerable amount of time). Now at the moment I got it worked out like this:
Option explicit
Private Sub cmdafsluit_Click()
dialogbox.Show
Unload Me
Application.Quit
End Sub
and then the code for 'dialogbox'
Option Explicit
Private Sub UserForm_activate()
ActiveWorkbook.save
Unload Me
End Sub
Now it does show the userform while saving, but the text on the userform doesnt appear when it is done activating (and since it never reaches that point, the text never gets shown). Now is there a way to work around this, remember that I only want a box to appear whilst the computer is saving, nothing more, nothing less. I just used a userform because I thought that might work, but unfortunately it didnt work out the way i wanted it to.
TIA
Frank
And yet I have another problem. I have a workbook which completely hides excel and only uses it in the background (so not viewable to the user). I have a button labeled close on the menu and I want it to save and quit. Well the save and quit part is easy, but here is the trick. While saving I want a dialog box to appear which tells the user that the program is busy saving (to prevent the user from starting to press buttons because the user thinks that the program stopped responding, saving takes a considerable amount of time). Now at the moment I got it worked out like this:
Option explicit
Private Sub cmdafsluit_Click()
dialogbox.Show
Unload Me
Application.Quit
End Sub
and then the code for 'dialogbox'
Option Explicit
Private Sub UserForm_activate()
ActiveWorkbook.save
Unload Me
End Sub
Now it does show the userform while saving, but the text on the userform doesnt appear when it is done activating (and since it never reaches that point, the text never gets shown). Now is there a way to work around this, remember that I only want a box to appear whilst the computer is saving, nothing more, nothing less. I just used a userform because I thought that might work, but unfortunately it didnt work out the way i wanted it to.
TIA
Frank