Bayport_Mama
New Member
- Joined
- Sep 8, 2022
- Messages
- 13
- Office Version
- 365
- Platform
- Windows
I have a workbook that is saved in a public network folder for others to open. Whenever I open the workbook (as if I were an end user), the code works flawlessly, however, if anyone else at my work tries to open it, they immediately get Run-time error '1004' Application-defined or Object-defined.
My code is stored in the ThisWorkbook object. Here's my code:
Anyone have suggestions on how to fix this??? I'm so confused as why it would work for me, but not others at my work.
My code is stored in the ThisWorkbook object. Here's my code:
VBA Code:
Private Sub workbook_open()
MsgBox "Update in progress, hang tight! ", vbOKOnly
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
Worksheets("Completed Reviews1").Range("A:F").ClearContents
Worksheets("Completed Reviews2").Range("A:F").ClearContents
Application.DisplayAlerts = False
Application.CutCopyMode = False
Application.EnableEvents = False
Workbooks.Open ("S:\locationoffile")
Workbooks("Information 2.xlsx").Worksheets("Sheet2").Range("a1", Range("a1").End(xlDown).Offset(0, 5)).Copy
ThisWorkbook.Worksheets("Completed Reviews2").Range("a1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Call Update_Officer_Reviews
Workbooks("Information 2.xlsx").Close
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.DisplayStatusBar = True
MsgBox "Update complete." & vbCrLf & vbCrLf & _
"Please select your name from the" & vbCrLf & _
"dropdown list to the left.", vbOKOnly
End Sub
Sub Update_Officer_Reviews()
Application.CutCopyMode = False
Workbooks("Information 2.xlsx").Worksheets("Sheet1").Select
Workbooks("Information 2.xlsx").Worksheets("Sheet1").Range("a1", Range("a1").End(xlDown).Offset(0, 5)).Copy
ThisWorkbook.Worksheets("Completed Reviews1").Range("a1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
ThisWorkbook.Worksheets("Current Reviews").Activate
End Sub
Anyone have suggestions on how to fix this??? I'm so confused as why it would work for me, but not others at my work.