Hello
i have the following code but i have the error message run time error 424
can you help me please?
thank you
i have the following code but i have the error message run time error 424
can you help me please?
thank you
Code:
Private Sub Form_Open(Cancel As Integer)
Dim Ret
Ret = IsOpen.Workbooks("G:\Rasteh Mona\Prioritylist.xlsx")
If Ret = True Then
MsgBox "The excel file is already in use by another user.please close the excel file and try agin"
End If
DoCmd.SetWarnings False
DoCmd.RunSQL ("drop table [tbl];")
DoCmd.SetWarnings False
DoCmd.RunMacro "Macro1"
DoCmd.RunSQL ("delete * from [asli];")
DoCmd.RunSQL ("insert into [asli] select * from [tbl];")
MsgBox "Updates have been done successfully."
End Sub