userform did not hide

userform did not hide

jaimuthu
Advocate Advocate
484 Views
3 Replies
Message 1 of 4

userform did not hide

jaimuthu
Advocate
Advocate
Private Sub OptionButton1_Click()
 If CheckBox7.Value = 0 Then
        If CheckBox3.Value Then
            ThisDrawing.SendCommand "BR0 "
        ElseIf CheckBox4.Value Then
            ThisDrawing.SendCommand "BR1 "
            ElseIf CheckBox5.Value Then
            ThisDrawing.SendCommand "BR2 "
            ElseIf CheckBox6.Value Then
            ThisDrawing.SendCommand "BR3 "
        End If
    Else
        If CheckBox3.Value Then
            ThisDrawing.SendCommand "BR0PL "
        ElseIf CheckBox4.Value Then
            ThisDrawing.SendCommand "BR1PL "
            ElseIf CheckBox5.Value Then
            ThisDrawing.SendCommand "BR2PL "
            ElseIf CheckBox6.Value Then
            ThisDrawing.SendCommand "BR3PL "
        End If
    End If
    
    UserForm1.Hide
End Sub

i create this code calling lisp command using vba its work perfect in autocad 2006 in autocad 2021 i pick checkbox3   the userform1 didnot hide but command is send 

0 Likes
485 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

Set a breakpoint on the If statement and see if there is any error.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

jaimuthu
Advocate
Advocate

thanks for your reply not work

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

Is the UserForm1 object variable set in this click method? Try using Me.Hide

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes