LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Need Programmer Advice concerning NonModal Forms

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
 
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
need an Excel VBA programmer xjetjockey Excel Discussion (Misc queries) 0 April 24th 07 09:56 PM
MODAL vs. NonMODAL JimP Excel Programming 5 November 18th 04 01:21 PM
Beginner programmer problem Rednosebob Excel Programming 0 September 28th 04 09:17 PM
VBA programmer feedback Jason Morin[_2_] Excel Programming 10 April 2nd 04 04:45 AM
Non programmer needs calculation help!!!!! Malcolm Excel Programming 4 February 4th 04 12:01 PM


All times are GMT +1. The time now is 02:59 AM.

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"