pearsonhenry2
New Member
- Joined
- Jun 10, 2021
- Messages
- 5
- Office Version
- 365
- 2019
- Platform
- Windows
A few months ago I made a relatively simple spreadsheet for a friend, used to record CPD sessions.
It ended up involving a simple form, but this used some VBA.
It was working back in February, but now has stopped working on mac. It now gives the error "Run-time error 1004 method vlookup of object 'WorksheetFunction' failed"
I have tried it on another friends mac, and tried turning on the developer toolbar etc. To be honest struggled to find my way around the mac interface to find approvals for macros.
Any ideas or suggestions gratefully received.
Here is a link to the file if it's helpful: CPD Record V2 blank.xlsm
It ended up involving a simple form, but this used some VBA.
It was working back in February, but now has stopped working on mac. It now gives the error "Run-time error 1004 method vlookup of object 'WorksheetFunction' failed"
I have tried it on another friends mac, and tried turning on the developer toolbar etc. To be honest struggled to find my way around the mac interface to find approvals for macros.
Any ideas or suggestions gratefully received.
VBA Code:
Private Sub Clinical_Change()
End Sub
Private Sub CategoryOfEvent_Change()
End Sub
Private Sub CommandButton1_Click()
'when we click continue button
'MsgBox "The UF will be closed", 0, "Message"
Dim TargetRow As Integer
TargetRow = Sheets("Engine").Range("C3").Value + 1
Sheets("Records").Range("Records_Start").Offset(TargetRow, 0).Value = TargetRow
Sheets("Records").Range("Records_Start").Offset(TargetRow, 1).Value = CDate(dt_date)
Sheets("Records").Range("Records_Start").Offset(TargetRow, 2).Value = Shift
Sheets("Records").Range("Records_Start").Offset(TargetRow, 3).Value = Application.WorksheetFunction.VLookup(Shift, Sheets("Reference_data").Range("B3:C8"), 2, False)
Sheets("Records").Range("Records_Start").Offset(TargetRow, 4).Value = CategoryOfEvent
Sheets("Records").Range("Records_Start").Offset(TargetRow, 5).Value = txt_Description
Sheets("Records").Range("Records_Start").Offset(TargetRow, 6).Value = txt_DevPoints
Sheets("Records").Range("Records_Start").Offset(TargetRow, 7).Value = txt_DevPlan
Sheets("Records").Range("Records_Start").Offset(TargetRow, 8).Value = CInt(TimeOnReflection)
Unload Data_UF
End Sub
Private Sub CommandButton2_Click()
Unload Data_UF
End Sub
Private Sub dt_Date_Change()
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label10_Click()
End Sub
Private Sub Label3_Click()
End Sub
Private Sub Label4_Click()
End Sub
Private Sub Label5_Click()
End Sub
Private Sub PaediatricNo_Click()
End Sub
Private Sub txt_notes_Change()
End Sub
Private Sub Label9_Click()
End Sub
Private Sub Shift_Change()
End Sub
Private Sub TimeOnReflection_Change()
End Sub
Private Sub txt_DevPlan_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Here is a link to the file if it's helpful: CPD Record V2 blank.xlsm