V8i VBA

I'm rather new to Microstation V8i VBA.  I am testing a toolbox with a user form that uses multipages.  It has several command buttons on each of the pages that call simple cad key-ins and other vba's.

An example:

Private Sub levOff_Click()
CadInputQueue.SendKeyin "levelmanager level offbyelem"
End Sub

The way it is supposed to work is you click the Level Off button, you then select the element for which you wish to turn off that elements level, and it turns it off.  The command is activating but it's not allowing me to select the element to be turned off.  When I try to select the element, I hear a ding thru my speakers and the form blinks.

This works when I'm not using multipages.  What am I missing?

The attached "PEC_Toolbox_Test.mvba" is using the multipage that is not working and the "PEC_Toolbox.mvba" is the one without and it is working.

PEC_Toolbox_Test.mvba

PEC_Toolbox.mvba

Parents Reply
  • Jon:
    Thanks for the info.  I'll add it to my library.  
    The code below in BOLD is what I added to get my form commands to work.
    Sub main()
        'Call UserForm_Initialize
        frmPECToolboxTest.Show vbModeless
    End Sub
    I've had fun (sarcastically said) searching the net for information.  I find a lot of stuff that is close to what I'm wanting but not exact.  I know what I want to do but don't have a clue on the verbiage to look it up.
    Thanks again!
    Dustin
Children
No Data