Access VBA code in corrupted workbook

DEksel

Board Regular
Joined
Oct 5, 2019
Messages
52
Incidentally, I've saved my Excel .XLSM Workbook with 2 macros with the absolutely same name. Forgot to rename the macro copy. Now, I can't open that workbook. Simple, no way! Is any way for this problem to be solved? Maybe to export codes to bases or text from another book? I am really, really(!!!) desperate. Need to save many hours of repeated works.

Thanks in advance.
 
Actually, it wasn't macro (as Sub ... End Sub) but Function. I am using them instead of macros. But this can't be the issue probably...
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I already did. Nothing works for that book. I have no access to VBA project. Sure I can rename if I see it. The only moment which is incredible is that guys from the next site https://www.coolutils.com/online/XLSM-to-XLSX online converted it to XLSX perfect in few seconds. They should use Python or PHP or ASP... Now I have all tables, data etc. No VBA! I wrote to them too (online form). Maybe they will answer.
 
Upvote 0
That site just converts files & by converting an xlsm file to an xlsx file, you will automatically lose all macros.
 
Upvote 0
I know but they had to open the file first! They could I can't! Some of procedure works forever (mouse busy) and then error. Simple rename xlsm to xlsx does not work. Maybe they can extract VBA from opened file... some coolutils or similar... Some guy wrote the code ExportVisualBasicCode which works perfect. But WB must be opened / active. It can't work with closed WB. Thank you for your time... if no solution till tomorrow, I will start to write all of that again... I can post full code here but don't know how about the credits...
Code:
For Each VBComponent In ActiveWorkbook.VBProject.VBComponents
 
Upvote 0
Workbooks can't be attached in this forum. I've sent to you link on that file (7ZIP archive.)
 
Upvote 0
Do you have any macros that run automatically when the workbook opens?


In ThisWorkbook all procedures are commented (I have source file). But I have some cell(s) with onChange events in 2 worksheets. Maybe they calls some action, vba checking out it's quality, finding double procedure and reject to open?
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top