KK1966
06-24-2008, 01:55 AM
Dear Experts
This is my 1st time to learn aboutb the USERFORM AND HAVE CREAT ONE BUT HAVE NOT WORK !!:( CODE AS BELOW,
KINDLY PLEASE HELP TO SEE AND LEARN ME ABOUT WHAT'S WAS I MADE A WRONG ,,,THXX
WHAT'S THE USERFORM TO DO;
TEXTBOX 1 = WS SHEET1 COL: A COUNT THE BLANK ROWS.
TEXTBOX 2 = WS SHEET1 COL: B COUNT THE BLANK ROWS.
TEXTBOX 3 = WS SHEET1 COL: C COUNT THE BLANK ROWS.
TEXTBOX 4 = WS SHEET1 COL: D COUNT THE BLANK ROWS.
CODE:
Private Sub CommandButton1_Click()
Unload UserForm3
End Sub
Private Sub OKButton1_Click()
With Sheets("Sheet1")
Dim r As Long: r = Range("A" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("B" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("C" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("d" & Rows.Count).End(xlUp).Row + 1
TextBox1 = Range("A" & r).Value = Value
TextBox2 = Range("B" & r).Value = Value
TextBox3 = Range("C" & r).Value = Value
TextBox4 = Range("D" & r).Value = Value
End Sub
Private Sub TextBox1_Change()
Dim r As Long: r = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & r).Value = Value
End Sub
Private Sub TextBox2_Change()
Dim r As Long: r = Range("B" & Rows.Count).End(xlUp).Row + 1
Range("B" & r).Value = Value
End Sub
Private Sub TextBox3_Change()
Dim r As Long: r = Range("C" & Rows.Count).End(xlUp).Row + 1
Range("C" & r).Value = Value
End Sub
Private Sub TextBox4_Change()
Dim r As Long: r = Range("d" & Rows.Count).End(xlUp).Row + 1
Range("D" & r).Value = Value
End Sub
Private Sub UserForm_Click()
End Sub
This is my 1st time to learn aboutb the USERFORM AND HAVE CREAT ONE BUT HAVE NOT WORK !!:( CODE AS BELOW,
KINDLY PLEASE HELP TO SEE AND LEARN ME ABOUT WHAT'S WAS I MADE A WRONG ,,,THXX
WHAT'S THE USERFORM TO DO;
TEXTBOX 1 = WS SHEET1 COL: A COUNT THE BLANK ROWS.
TEXTBOX 2 = WS SHEET1 COL: B COUNT THE BLANK ROWS.
TEXTBOX 3 = WS SHEET1 COL: C COUNT THE BLANK ROWS.
TEXTBOX 4 = WS SHEET1 COL: D COUNT THE BLANK ROWS.
CODE:
Private Sub CommandButton1_Click()
Unload UserForm3
End Sub
Private Sub OKButton1_Click()
With Sheets("Sheet1")
Dim r As Long: r = Range("A" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("B" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("C" & Rows.Count).End(xlUp).Row + 1
Dim r As Long: r = Range("d" & Rows.Count).End(xlUp).Row + 1
TextBox1 = Range("A" & r).Value = Value
TextBox2 = Range("B" & r).Value = Value
TextBox3 = Range("C" & r).Value = Value
TextBox4 = Range("D" & r).Value = Value
End Sub
Private Sub TextBox1_Change()
Dim r As Long: r = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & r).Value = Value
End Sub
Private Sub TextBox2_Change()
Dim r As Long: r = Range("B" & Rows.Count).End(xlUp).Row + 1
Range("B" & r).Value = Value
End Sub
Private Sub TextBox3_Change()
Dim r As Long: r = Range("C" & Rows.Count).End(xlUp).Row + 1
Range("C" & r).Value = Value
End Sub
Private Sub TextBox4_Change()
Dim r As Long: r = Range("d" & Rows.Count).End(xlUp).Row + 1
Range("D" & r).Value = Value
End Sub
Private Sub UserForm_Click()
End Sub