Results 1 to 3 of 3

Thread: VB USERFORM Usage

  1. #1
    Join Date
    Jan 2007
    Posts
    7

    VB USERFORM Usage

    Subject: Can a person minimize a userform window and continue to use AutoCAD with stopping a CAD VBA program ? CAD version 07

    If is use
    Private Sub CommandButton4_Click()
    'UserForm1.Left = 240
    'UserForm1.Top = 330
    UserForm1.hide
    End Sub

    This will stop my program and put me in code window. I would like to only minimize my VB userform and use cad for short period of time then maximize my window for vba program usage. Is that possable?
    thank you,



    muck
    View Public Profile
    Send a private message to muck
    Find More Posts by muck

  2. #2
    Join Date
    Sep 2005
    Posts
    65
    Yes it is possible.

    The best way to do it is to open the form but make the form non modal.

    I have a form that when you click fix in auto cad, it launches another form with a button called return to icheck. This form is modal set to false and therefore lets the user continue working in CAD until they wish to relaunch the main form.

    The form property is Showmodal and it should be set to false. If you get stuck, look at help on this function and the example should show you how to deal with it!

    I hope it helps.

  3. #3
    Join Date
    Jul 2007
    Posts
    3

    Modal Modless

    Create a button CmdModal and add this code;

    Private Sub CmdModal_Click()
    If CmdModal.Caption = "Modeless" Then
    CmdModal.Caption = "Modal"
    Me.Hide
    Me.Show vbModless
    ElseIf CmdModal.Caption = "Modal" Then
    CmdModal.Caption = "Modeless"
    Me.Hide
    Me.Show vbModal
    End If
    End Sub

    and you can toggle between Modal end Modeless form

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •