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
tHANK YOU !!! I've been looking for this code long time ago in spanish, you english people so good :P
ReplyDeletetHANK YOU its working
ReplyDelete