What am I doing wrong?

Discussion in 'AutoCAD' started by jvli, Jul 3, 2003.

  1. jvli

    jvli Guest

    I'm new to VBA and am having trouble running my form from an icon. Ideally I would like to be able to load and run my project from one icon. Currently I have to load the .dvb file and run the form from the VBA manager as I get the following message when I try to launch the form from an icon..."Macro not found" even after loading the .dvb.
    The program consists of one form with all the code written in the code window of the form. There are no modules.
     I think that I went about creating the project the wrong way in the beginning. What steps should I have followed to allow me to create the project and package it for other users to avail of through an icon?
    Any assistance would be very, very much appreciated.
     
    jvli, Jul 3, 2003
    #1
  2. You can't run a form from within AutoCAD. You need to add a module and
    create a sub that starts the form something like:

    Public Sub ShowMyForm()
    Load MyForm
    MyForm.Show
    End Sub


    ___________________________
    Mike Tuersley
    AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jul 3, 2003
    #2
  3. jvli

    jvli Guest

    Success, worked a treat Mike. Nice one.
     
    jvli, Jul 3, 2003
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.