Run-time error '-2147319767 (80028029)

CaptainGravyBum

New Member
Joined
Dec 1, 2023
Messages
46
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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,096
Messages
6,123,074
Members
449,093
Latest member
ripvw

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