Link to home
Start Free TrialLog in
Avatar of cssc1
cssc1Flag for United States of America

asked on

What to do with this error when I run the macro Company and repair command button.

I get an error from this code:

Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

CommandBars("Menu Bar"). _
Controls("Tools "). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click

End Sub
++++++++++++++++++++++++++++++++++++++++++

I found this code on line and thought it would work.

+++++++++++++++++++++++++++++++++++++++++++++

See attached image
Error-On-Compact-and-repair-macro.jpg
HBF-Modified-Root-Cause-Analysis-for-Tun
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cssc1

ASKER

thanks