Excelgoodies logo +1 236 900 6300

LEARN THIS HANDS ON

Excel VBA Macros Training

ET . Live Online FILLING FAST
View all upcoming batches
How to Repair Excel Workbook using VBA?

How to Repair Excel Workbook using VBA?

 

The following code uses VBA to open and repair the workbook (the option available using Excel Open Dialog)

 

Sub OpenAndRepairWorkbook()

Dim oWB As Workbook

On Error GoTo Err_Open

Set oWB = Workbooks.Open(Filename:=”C:\ShasurData
\ExcelVBA\VBE Tools 2007.xlam”,
CorruptLoad:=XlCorruptLoad.xlRepairFile)

Exit Sub

Err_Open:

MsgBox Err.Number ; ” – ” ; Err.Description

Err.Clear

End Sub

 

Explore an Upcoming Excel VBA Batch nearby you to, learn effective ways of VB Coding and, automate your routine Excel Reports, processes and tasks with ease.

 

Happy Excelling
Team Excelgoodies

VBA & Python

New

Next Batches Now Live

Power BIPower BI
SQLSQL
Power AppsPower Apps
Power AutomatePower Automate
Microsoft FabricMicrosoft Fabrics
AzureAzure Data Engineering
Explore Dates & Reserve Your Spot → Reserve Your Spot →