|
-
Sep 7th, 2000, 01:12 PM
#4
Thread Starter
Member
OOPS! I now have a related problem.
I need to be able to reset the counter when one or more of the child forms are closed. As it is now, once you open three files, you can't open another even if you close the first three.
Any help is appreciated.
Wendy
Here'my code:
code-------------------------------------------------------
Private Sub mnuFileNewWorksheet_Click()
'Purpose: Add and allow up to 3 empty child windows and new documents.
Dim fd As New frmDoc
Static Counter As Integer
Counter = Counter + 1
If Counter <= 3 Then
Set fd = New frmDoc
Load fd 'Load a new child window
iDocCounter = iDocCounter + 1 'increment the child window counter
fd.Caption = "Worksheet (" & CStr(iDocCounter) & ")"
fd.Show 'Show the new child window
StatusBar1.Panels(1).Text = "Worksheet Created"
End If
End Sub
code-----------------------------------------------------
[Edited by Wendy Jackson on 09-07-2000 at 02:16 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|