Pretty Basic Excel Macro Help
Closed
The Reinman
-
15 Jul 2008 à 13:05
Ivan-hoe Posts 433 Registration date Saturday 16 February 2008 Status Member Last seen 17 October 2008 - 16 Jul 2008 à 03:18
Ivan-hoe Posts 433 Registration date Saturday 16 February 2008 Status Member Last seen 17 October 2008 - 16 Jul 2008 à 03:18
Related:
- Pretty Basic Excel Macro Help
- Excel mod apk for pc - Download - Spreadsheets
- Run macro in excel - Guide
- How to run a macro in excel - Guide
- How to open visual basic in excel - Guide
- Kernel for excel repair - Download - Backup and recovery
1 response
Ivan-hoe
Posts
433
Registration date
Saturday 16 February 2008
Status
Member
Last seen
17 October 2008
110
16 Jul 2008 à 03:18
16 Jul 2008 à 03:18
Hello,
I guess you click on a button to validate the data put in the textboxes.
Your VBA macro could look like this :
Ivan
I guess you click on a button to validate the data put in the textboxes.
Your VBA macro could look like this :
Private Sub CommandButton1_Click()
Dim LastLine As Integer, NewLine As Integer
With Sheets("Update_log")
LastLine = .Cells(Rows.Count, "A").End(xlUp).Row
NewLine = LastLine + 1
If Not IsNumeric(.Cells(LastLine, "A").Value) Then
.Cells(NewLine, "A").Value = 1
Else
.Cells(NewLine, "A").Value = .Cells(LastLine, "A").Value + 1
End If
.Cells(NewLine, "B").Value = OperatorTXT.Value: OperatorTXT.Value = Empty
.Cells(NewLine, "C").Value = OperatorTXT2.Value: OperatorTXT2.Value = Empty
End With
End Sub
Ivan