J
JimP
To all,
Can someone PLEASE advise how they address the following problem that
is easily recreatable and ends with eXcel aborting ... eXcel 2000
(SP3)
I have a workbook with a number of sheets ... one of the sheets has an
activeX CommandButton that launches a NonModal Form.
1) If I have the NonModal Form displayed and I group select and delete
some of the worksheets (including the one that had the NonModal Form
displayed), eXcel aborts ...
2) I added code to the Worksheet_Deactivate event to determine when
the user has left the worksheet containing the NonModal Form, I then
remove the Form from the Display... With the code:
"frmNAVIGATION.Hide" ... excel aborts when the WorkSheet is Deleted
also ...
'''''''''''
Private Sub Worksheet_Deactivate()
' If FORM is being displayed as NonModal, Hide it
Application.ScreenUpdating = False
On Error Resume Next
frmNAVIGATION.Hide : Application.ScreenUpdating = False
On Error GoTo 0
End Sub
'''''''''''
3) If I use "Unload frmNAVIGATION" ... then no abort occurs but NOW
I'm left with a programming problem that I don't know how to solve ...
That is, when the User eventually gets back to the specific sheet ...
I'm uncertain how I should have Recorded the 'state' of the Nonmodal
Form at the time the WorkSheet was Deactivated ... so that I can
restore it if need be ...
'''''''''''
Private Sub Worksheet_Deactivate()
' If FORM is being displayed as NonModal, Unload it
Application.ScreenUpdating = False
On Error Resume Next
Unload frmNAVIGATION: Application.ScreenUpdating = False
On Error GoTo 0
End Sub
'''''''''''
QUESTION:
ANY IDEAS how to track the state of a FORM at the time that a
Worksheet is Deactivated until the time (if ever) that it is
"Activated" again ?????
Thanks,
JimP
Can someone PLEASE advise how they address the following problem that
is easily recreatable and ends with eXcel aborting ... eXcel 2000
(SP3)
I have a workbook with a number of sheets ... one of the sheets has an
activeX CommandButton that launches a NonModal Form.
1) If I have the NonModal Form displayed and I group select and delete
some of the worksheets (including the one that had the NonModal Form
displayed), eXcel aborts ...
2) I added code to the Worksheet_Deactivate event to determine when
the user has left the worksheet containing the NonModal Form, I then
remove the Form from the Display... With the code:
"frmNAVIGATION.Hide" ... excel aborts when the WorkSheet is Deleted
also ...
'''''''''''
Private Sub Worksheet_Deactivate()
' If FORM is being displayed as NonModal, Hide it
Application.ScreenUpdating = False
On Error Resume Next
frmNAVIGATION.Hide : Application.ScreenUpdating = False
On Error GoTo 0
End Sub
'''''''''''
3) If I use "Unload frmNAVIGATION" ... then no abort occurs but NOW
I'm left with a programming problem that I don't know how to solve ...
That is, when the User eventually gets back to the specific sheet ...
I'm uncertain how I should have Recorded the 'state' of the Nonmodal
Form at the time the WorkSheet was Deactivated ... so that I can
restore it if need be ...
'''''''''''
Private Sub Worksheet_Deactivate()
' If FORM is being displayed as NonModal, Unload it
Application.ScreenUpdating = False
On Error Resume Next
Unload frmNAVIGATION: Application.ScreenUpdating = False
On Error GoTo 0
End Sub
'''''''''''
QUESTION:
ANY IDEAS how to track the state of a FORM at the time that a
Worksheet is Deactivated until the time (if ever) that it is
"Activated" again ?????
Thanks,
JimP