I get error 438 - Object doesn't support this property or method.
Via my "cmdAdd" command button on userform I am checking the current row, column 52 if it contains "1" but I cannot figure out the correct format for the line. Here is my code:
Also, can anyone recommend a good online course for someone struggling at intermediate stage in excel vba, please? I've done a basic face to face 2 day course which I had gone beyond via previous self teaching. However, I am struggling with an application that just keeps throwing me in the deep end & taking up too much precious time with a deadline coming up very quickly.
Via my "cmdAdd" command button on userform I am checking the current row, column 52 if it contains "1" but I cannot figure out the correct format for the line. Here is my code:
Rich (BB code):
Public lCurrentRow As Long
________________________
Private Sub cmdAdd_Click()
Dim msg As String, Title As String
Dim Config As Integer, Ans As Integer
lCurrentRow = ActiveCell.Row
If (ActiveSheet.lCurrentRow & Cells(52) = "1") Then '< code in ERROR
msg = "You clicked 'Add New Record'. Are you sure you want a add a new record using an existing record?"
Title = "This is a previously written record"
Config = vbYesNo + vbQuestion
Ans = MsgBox(msg, Config, Title)
If Ans = vbYes Then SaveRow
If Ans = vbNo Then Exit Sub
End If
If (Cells(0.52) = "") Then
Call SaveRow
End If
' Clear the input form
Call ResetAllFields
End Sub
Also, can anyone recommend a good online course for someone struggling at intermediate stage in excel vba, please? I've done a basic face to face 2 day course which I had gone beyond via previous self teaching. However, I am struggling with an application that just keeps throwing me in the deep end & taking up too much precious time with a deadline coming up very quickly.