doesnot hide userfrom1 how to solve this problem

doesnot hide userfrom1 how to solve this problem

jaimuthu
Advocate Advocate
395 Views
3 Replies
Message 1 of 4

doesnot hide userfrom1 how to solve this problem

jaimuthu
Advocate
Advocate
Private Sub CommandButton1_Click()

Dim FN As String
Dim LN As Double

FN = TextBox3.Value
LN = TextBox4.Value

ThisDrawing.SendCommand "tk" & Chr(10) & FN & Chr(10) & LN & Chr(10)
UserForm1.Hide
TextBox3.Value = Clear
TextBox4.Value = Clear
'TextBox3.SetFocus



End Sub

Private Sub Frame1_Click()

End Sub

Private Sub TextBox1_Change()
ThisDrawing.SetVariable "USERS1", TextBox1.Value
End Sub

Private Sub TextBox2_Change()
ThisDrawing.SetVariable "USERS2", TextBox2.Value
End Sub

Private Sub TextBox3_Change()

End Sub
0 Likes
396 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

Try "me.Hide". Also note that the SendCommand method will run after all your vba code runs.

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

me.hide  not work

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

I assume that the code below is in the userform. If so, there is no other way to hide the form. If you post your dvb, I might be able to take a look at it. If the upload won't let you post a dvb, then zip it first.

 

Private Sub CommandButton1_Click()

Dim FN As String
Dim LN As Double

FN = TextBox3.Value
LN = TextBox4.Value

ThisDrawing.SendCommand "tk" & Chr(10) & FN & Chr(10) & LN & Chr(10)

'UserForm1.Hide
Me.Hide

TextBox3.Value = Clear
TextBox4.Value = Clear
'TextBox3.SetFocus

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