Excelpromax123
Board Regular
- Joined
- Sep 2, 2021
- Messages
- 167
- Office Version
- 2010
- Platform
- Windows
Code Userform
Private Sub CommandButton1_Click()
If Range("A1") = 1 Then
Range("A1").Value = TextBox1.Value
Else
Unload Me
End If
End Sub
Now I just move all the code to Userform. then from Userform call Module
Private Sub CommandButton1_Click()
aaa
End Sub
Sub aaa()
If Range("A1") = 1 Then
Range("A1").Value = TextBox1.Value
Else
Unload Me
End If
End Sub
I did the above but the code doesn't work. Thanks to everyone for help. thank
Private Sub CommandButton1_Click()
If Range("A1") = 1 Then
Range("A1").Value = TextBox1.Value
Else
Unload Me
End If
End Sub
Now I just move all the code to Userform. then from Userform call Module
Private Sub CommandButton1_Click()
aaa
End Sub
Sub aaa()
If Range("A1") = 1 Then
Range("A1").Value = TextBox1.Value
Else
Unload Me
End If
End Sub
I did the above but the code doesn't work. Thanks to everyone for help. thank