Hi Guys,
First post here!
I am new to VBA.
I have a bunch of excel files from which I need to extract some data. All of these files have macros, activex controls, forms, pivot tables etc.
Some of these files are corrupt. When I try to open these files manually (double click or File>Open), excel crashes.
Same thing is happening when I try to open these files using workbooks.open command in VBA. So far I have tried following things:
1. Application.EnableEvents = False
Didn't work
2. Workbooks.Open(filename,readonly:=true)
Didn't work
3. Disabled all macros and AciveX in "Trust Center"
It worked, but I don't want end users to change these setting every time they need to run this macro.
Is there any other way? If I could create a report of these corrupted files, it would be extra awesome
Cheers!
Bookmarks