Run-time error '-2147319767 (80028029)

CaptainGravyBum

Board Regular
Joined
Dec 1, 2023
Messages
77
Office Version
  1. 365
Platform
  1. Windows
Hello,
Sorry I've been a bit needy on here lately.
I have a macro enabled workbook that I've been working on and it's pretty much complete - at least I thought it was until I asked another person to try it on their PC. When they close the workbook, the runtime error above appears. It works fine on my PC and I tried enabling macros on their PC as I thought it could be the issue but it hasn't made a difference.
The only thing I can think it relates to is the following code which runs on close:

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Sheets("Cross-Charge Request").Select
Range("E4,E5,E6,B8:F10").Select
Selection.ClearContents
Range("E4").Select
MsgBox "Cross Charge Request Form Updated"
Application.DisplayAlerts = False
If Saved = False Then
ActiveWorkbook.Save
End If
Application.DisplayAlerts = True

End Sub

I've been staring at this and can't see the problem, can anyone else help?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top