2 Forms in a DVB?

2 Forms in a DVB?

Anonymous
Not applicable
497 Views
11 Replies
Message 1 of 12

2 Forms in a DVB?

Anonymous
Not applicable
I created a VBA project, added a form with the edit boxes, option buttons, etc.....Everything worked fine......I now added a second form and added edit boxes, etc.....No matter what I do now, I cannot call the first form.....I can Form2.show and the second form comes up...If I Form1.show, it says Object Not Found (or something like that).....I even tried removing Form2 and still cannot display Form1.....Is this Another limitation of VBA (Only 1 form per Prroject) or am I doing something wrong....Also, I named my forms Nameform1, Nameform2, etc.....But all I see in the Object Pull down list (The drop down list at the top, on the left) is UserForm....I do not see any of my Form Names
0 Likes
498 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
No, this is not a limitation. I have used a second form as a quick little
help guide that can be popped up on top of the other form at any time.

Try posting the dvb, otherwise it's just blind guessing.....

wrote in message news:4932484@discussion.autodesk.com...
I created a VBA project, added a form with the edit boxes, option buttons,
etc.....Everything worked fine......I now added a second form and added edit
boxes, etc.....No matter what I do now, I cannot call the first form.....I
can Form2.show and the second form comes up...If I Form1.show, it says
Object Not Found (or something like that).....I even tried removing Form2
and still cannot display Form1.....Is this Another limitation of VBA (Only 1
form per Prroject) or am I doing something wrong....Also, I named my forms
Nameform1, Nameform2, etc.....But all I see in the Object Pull down list
(The drop down list at the top, on the left) is UserForm....I do not see any
of my Form Names
0 Likes
Message 3 of 12

Anonymous
Not applicable
you say you renamed your form to NameForm1, does NameForm1.Show not work?

if you renamed your other form to NameForm2, i don't see how Form2.show
could work?
i must be missing something

--
Mark


wrote in message news:4932484@discussion.autodesk.com...
I created a VBA project, added a form with the edit boxes, option buttons,
etc.....Everything worked fine......I now added a second form and added edit
boxes, etc.....No matter what I do now, I cannot call the first form.....I
can Form2.show and the second form comes up...If I Form1.show, it says
Object Not Found (or something like that).....I even tried removing Form2
and still cannot display Form1.....Is this Another limitation of VBA (Only 1
form per Prroject) or am I doing something wrong....Also, I named my forms
Nameform1, Nameform2, etc.....But all I see in the Object Pull down list
(The drop down list at the top, on the left) is UserForm....I do not see any
of my Form Names
0 Likes
Message 4 of 12

Anonymous
Not applicable
Here goes.....I have 2 forms (I am looking at the VBA project as I write).....Form1 is named frmjb...... Form 2 is named frmViewsToDraw.....I inserted a Module....I create a Sub
Public Sub test()
frmjb.Show
End Sub

If I run this, I get Run-Time error '424' Object Required..and it highlights frmjb.Show

If I change the Sub to:

Public Sub test()
frmViewsToDraw.Show
End Sub

It displys the other form.

Basically no matter what I do...I cannot distlay frmjb......Even though it was working fine...before I added the second form....Also, frmjb was named something else when it was working....I renamed it when I added the second form.
0 Likes
Message 5 of 12

Anonymous
Not applicable
Also....when I type frmjb. All the prameters Pop up (Like Show) which means that the form exists within the .DVB...I
0 Likes
Message 6 of 12

Anonymous
Not applicable
Try loading your form by itself......with the form as the active window in
VBAIDE, press F5. If there is a problem with your form's code, calling it
from a module stops the module from loading and doesn't point to the real
problem.


wrote in message news:4932562@discussion.autodesk.com...
Here goes.....I have 2 forms (I am looking at the VBA project as I
write).....Form1 is named frmjb...... Form 2 is named frmViewsToDraw.....I
inserted a Module....I create a Sub
Public Sub test()
frmjb.Show
End Sub

If I run this, I get Run-Time error '424' Object Required..and it highlights
frmjb.Show

If I change the Sub to:

Public Sub test()
frmViewsToDraw.Show
End Sub

It displys the other form.

Basically no matter what I do...I cannot distlay frmjb......Even though it
was working fine...before I added the second form....Also, frmjb was named
something else when it was working....I renamed it when I added the second
form.
0 Likes
Message 7 of 12

Anonymous
Not applicable
Here is the .dvb....Trying running the one macro in the file, which all it does is try to SHOW frmSaddleDims.....It was working fine until....
I added the second form and renamed the first one (frmSaddleDims was named something else)....
DVB Too big to post here..I will place it in Customer Files SADDLe.DVB
0 Likes
Message 8 of 12

Anonymous
Not applicable
Tried that...same error
0 Likes
Message 9 of 12

Anonymous
Not applicable
OK, well I can't run it due to your use of MS PictureClip Control 6.0 which
I don't have. However, looking at the Form's Initialize event, you have a
number of lines referencing a non-existent form.....probably the previous
name of the form. Remove the portion of all lines that refer to a form,
leaving just the
cboSad_boltdia.AddItem Whatever

That should do it.

wrote in message news:4932621@discussion.autodesk.com...
Tried that...same error
0 Likes
Message 10 of 12

Anonymous
Not applicable
OK...That did it....Thanks, I am somewhat new at this.
One more weird thing...
Thinking that the form was corrupt....I created a brand new form within the VBA project.
I copied all the controls from the original form (frmSaddleDims) and pasted onto the new form. I also copied all the Code and pasted the the new form...I removed the old form (frmSaddleDims)......Now when I try to rename the new, Copied form to the old name (frmSaddleDims) I get an error:
Path/File access error.
I won't let me name the new form the same name as the old, deleted form....??
0 Likes
Message 11 of 12

Anonymous
Not applicable
When I renamed frmSaddleEnd to frmSaddleEnd and was able to load the entry
form. Sounds like Jeff was right.

John Coon
wrote in message news:4932692@discussion.autodesk.com...
OK...That did it....Thanks, I am somewhat new at this.
One more weird thing...
Thinking that the form was corrupt....I created a brand new form within the
VBA project.
I copied all the controls from the original form (frmSaddleDims) and pasted
onto the new form. I also copied all the Code and pasted the the new
form...I removed the old form (frmSaddleDims)......Now when I try to rename
the new, Copied form to the old name (frmSaddleDims) I get an error:
Path/File access error.
I won't let me name the new form the same name as the old, deleted
form....??
0 Likes
Message 12 of 12

Anonymous
Not applicable
Hi,

To help you identify problems like this:

Put "Option Explicit" at the top of the code for all Modules and all forms.

Then Select [Debug][Compile]

This will take you to the first syntactical defect in your code. Fix it and
continue with [Debug][Compile] till the compile works without error.

--

Laurie Comerford
CADApps
www.cadapps.com.au
wrote in message news:4932692@discussion.autodesk.com...
OK...That did it....Thanks, I am somewhat new at this.
One more weird thing...
Thinking that the form was corrupt....I created a brand new form within the
VBA project.
I copied all the controls from the original form (frmSaddleDims) and pasted
onto the new form. I also copied all the Code and pasted the the new
form...I removed the old form (frmSaddleDims)......Now when I try to rename
the new, Copied form to the old name (frmSaddleDims) I get an error:
Path/File access error.
I won't let me name the new form the same name as the old, deleted
form....??
0 Likes