K
Ken McLennan
G'day there again People,
I was just reading a thread here about modal/modeless forms. I'm
using Excel 2000, with a modal form that's not performing quite the way
I thought it would.
I have the following code in the ThisWorkBook object:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Me.Saved = False Then
Load exitFrm
exitFrm.Show
Me.Save
exitFrm.Hide
Unload exitFrm
End If
End Sub
exitFrm is a userform with no buttons, but says "Saving data...
please wait". It's very pretty with white letters on a red background
=).
When used modally, as expected, I have to close the form before
the Me.Save part works. However if I set modal to false, there is only a
blank userform shown. I have a title bar, a thick line around the form
and more white space than is healthy.
I've tried, without success, to install various counters in
different nooks and crannies to see if it just needed some thinking
space to draw the text. Now I've run out of ideas and I'm hoping someone
can see what I've done wrong.
Thanks once more
Ken McLennan
Qld, Australia
I was just reading a thread here about modal/modeless forms. I'm
using Excel 2000, with a modal form that's not performing quite the way
I thought it would.
I have the following code in the ThisWorkBook object:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Me.Saved = False Then
Load exitFrm
exitFrm.Show
Me.Save
exitFrm.Hide
Unload exitFrm
End If
End Sub
exitFrm is a userform with no buttons, but says "Saving data...
please wait". It's very pretty with white letters on a red background
=).
When used modally, as expected, I have to close the form before
the Me.Save part works. However if I set modal to false, there is only a
blank userform shown. I have a title bar, a thick line around the form
and more white space than is healthy.
I've tried, without success, to install various counters in
different nooks and crannies to see if it just needed some thinking
space to draw the text. Now I've run out of ideas and I'm hoping someone
can see what I've done wrong.
Thanks once more
Ken McLennan
Qld, Australia