troubleshooting Question

Microsoft Visual Basic Error 400

Avatar of mato01
mato01Flag for United States of America asked on
Microsoft OfficeMicrosoft Applications
3 Comments1 Solution2564 ViewsLast Modified:
I have a spreadsheet that when you click on a button with the below code makes a backup copy of the worksheet. I sent the worksheet to one of my colleagues and when they click on the button they get a message box (Microsoft Visual Basic 400 error).  It makes the backup copy, but the message box is still there.

Sub CopyforBackup()
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Dim Activewb As Workbook
Set Activewb = ThisWorkbook
Call BackupFiles
Call DeleteAllVBACodes

Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.Calculation = xlCalculationAutomatic

End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros