dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,392
- Office Version
- 365
- 2016
- Platform
- Windows
I need some help with some vba syntax. I have part of a procedure that opens another workbook, performs some actions then closes it. This is the code I have:
All the workbooks are stored in the same folder and the variable DocYearName contains the file name of the workbook to be opened. I have had a heap of trouble with workbooks being corrupted and I have no idea why they are being corrupted.
How do I incorporate repairing a corrupted file into this command?
Code:
Workbooks.Open (ThisWorkbook.Path & "\" & DocYearName)
All the workbooks are stored in the same folder and the variable DocYearName contains the file name of the workbook to be opened. I have had a heap of trouble with workbooks being corrupted and I have no idea why they are being corrupted.
How do I incorporate repairing a corrupted file into this command?
Last edited: