VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simple stuff....

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
257 Views, 6 Replies

Simple stuff....

Simple, I hope anyway. First, I wanted to get an idea of what other people use for activating macros they create? Right now I'm creating my shortcut in LISP and using (vl-vbarun "macro"). What other methods are used or recommended??

Second, I've created some forms and gotten to work pretty well, however, when I create a Close/Exit button, the code I've been putting in is:

Private Sub cmdClose_Click()
Unload USERFORM
End
End Sub

When I click the button, it seems to work fine, but on the command line window, I see 'Execution Error1'. Doesn't really seem to affect he routine or the results, but am curiuos as to what it is.

Thanks,

Jason
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

PRE
Simple, I hope anyway. First, I wanted to get an idea of what other people use for activating macros they create? Right now I'm creating my shortcut in LISP and using (vl-vbarun "macro"). What other methods are used or recommended??

Second, I've created some forms and gotten to work pretty well, however, when I create a Close/Exit button, the code I've been putting in is:

Private Sub cmdClose_Click()
Unload USERFORM
End
End Sub

When I click the button, it seems to work fine, but on the command line window, I see 'Execution Error1'. Doesn't really seem to affect he routine or the results, but am curiuos as to what it is.

Thanks,
Jason
/PRE
Message 3 of 7
Anonymous
in reply to: Anonymous

to first there are already placed samples in the newsgroup
(vbastmt, -vbarun)
to the second: don't use the "End"-statement

regards, alfred


"jaswild" schrieb im Newsbeitrag
news:f11a777.-1@WebX.maYIadrTaRb...
> Simple, I hope anyway. First, I wanted to get an idea of what other people
use for activating macros they create? Right now I'm creating my shortcut in
LISP and using (vl-vbarun "macro"). What other methods are used or
recommended??
> Second, I've created some forms and gotten to work pretty well, however,
when I create a Close/Exit button, the code I've been putting in is:
>
> Private Sub cmdClose_Click()
> Unload USERFORM
> End
> End Sub
>
> When I click the button, it seems to work fine, but on the command line
window, I see 'Execution Error1'. Doesn't really seem to affect he routine
or the results, but am curiuos as to what it is.
>
> Thanks,
>
> Jason
>
Message 4 of 7
Anonymous
in reply to: Anonymous

we have a routine that runs (in vba) that creates
and loads a custom menu file and toolbar


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Simple,
I hope anyway. First, I wanted to get an idea of what other people use for
activating macros they create? Right now I'm creating my shortcut in LISP and
using (vl-vbarun "macro"). What other methods are used or recommended??

Second, I've created some forms and gotten to work pretty well, however,
when I create a Close/Exit button, the code I've been putting in is:

Private Sub cmdClose_Click()
    Unload USERFORM

    End
End Sub

When I click the button, it seems to work fine, but on the command line
window, I see 'Execution Error1'. Doesn't really seem to affect he routine or
the results, but am curiuos as to what it is.

Thanks,

Jason

Message 5 of 7
Anonymous
in reply to: Anonymous

Alfred, If I don't use END, what do I use in my Close/Exit button code to unload the form and macro?

Thanks.
Message 6 of 7
Anonymous
in reply to: Anonymous

Public Sub yourmacro()

 

   
frmYourForm.Show
    

    'the code in your form activate
event runs here


    Unload
frmYourForm
   
End Sub

'code in your form:

 

Private Sub
cmdExit_Click()
    
    Unload
Me

 

End Sub


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Alfred,
If I don't use END, what do I use in my Close/Exit button code to unload the
form and macro?

Thanks.

Message 7 of 7
Anonymous
in reply to: Anonymous

Kevin - Thanks for having asked this question. I had the same problem and
posted something similar. Had I read more closely in the newsgroup, I would
have found this last week!

Alfred - Thanks for this tip. My "Execution Error" problem is now gone.

Aaron

"Alfred NESWADBA" wrote in message
news:0DAB02EF561067E82921512EE3C46AAF@in.WebX.maYIadrTaRb...
> to first there are already placed samples in the newsgroup
> (vbastmt, -vbarun)
> to the second: don't use the "End"-statement
>
> regards, alfred
>
>
> "jaswild" schrieb im Newsbeitrag
> news:f11a777.-1@WebX.maYIadrTaRb...
> > Simple, I hope anyway. First, I wanted to get an idea of what other
people
> use for activating macros they create? Right now I'm creating my shortcut
in
> LISP and using (vl-vbarun "macro"). What other methods are used or
> recommended??
> > Second, I've created some forms and gotten to work pretty well, however,
> when I create a Close/Exit button, the code I've been putting in is:
> >
> > Private Sub cmdClose_Click()
> > Unload USERFORM
> > End
> > End Sub
> >
> > When I click the button, it seems to work fine, but on the command line
> window, I see 'Execution Error1'. Doesn't really seem to affect he routine
> or the results, but am curiuos as to what it is.
> >
> > Thanks,
> >
> > Jason
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost