Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with MDIchild
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00396987
Message ID:
00397495
Vues:
15
>am using Service Pack 4
>
>I have found the problem to happen only when I load new unit forms. Here is the sample code I used to test it.
>
>Dim UnitForm() as new frmUnit
>Dim UnitNumber as long
>
>Private Sub MDIForm_Click()
>' Program unloaded fine before I clicked to make a new unit form
>' It will give an illegal operation now
>
>' Add a new form to our form array
>UnitNumber = UnitNumber + 1
>ReDim Preserve UnitForms(0UnitNumber) As New frmUnit
>
>UnitForms(UnitNumber).Show
>End Sub
>
What is th "0" on this line:
ReDim Preserve UnitForms(<B>0</B>UnitNumber) As New frmUnit
Do you have "Option Explicit"? It is the kind of the thing that is trap with this statement!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform