Excel xlsm file macro not showing - excel

I have a xlsm file that today I opened and i can't reach the macros in it.
Any idea what could have happened?

I think i answered it rather quickly after searching here:
https://www.excelforum.com/excel-general/1112769-corrupted-microsoft-excel-macro-enabled-workbook-xlsm-file.html

Related

Excel workbook creating undeletable sheeets during execution

I'm getting more and more Sheets in my workbook?
Does anybody know how I delete these additional sheets?
I'm running excel 365 and the file is located on a sharepoint.
Any help is appreciated.
Ok. I haven't had any luck regarding this issue. However, I found others dealing with the same issue. The solution I came up with might help, and is quite simple:
Save the document as a xlsx file. This deletes the phantom sheets. Then manually transfer forms and macros and save the document as an xlsm file. Not a pretty solution. But it works.

How to recover Excel VBA Module from a closed Excel file

I have an Excel Office 365 file that immediately crashes upon opening.
The file contains VBA modules that do not have a backup. I would like to extract the VBA modules without opening the file.
Is there a way to read the contents of the VBA modules and save them for reuse in a new file?
Kudos to Bigben , i opened excel in safe mode and was able to recover my code modules.
Although it does not answer the question i originally posed ie: is there a way to read the modules without opening the file", it achieves the same intent. Thank you BigBen

VBA Module disappears after saving Excel workbook

I was just introduced to VBA. However, on saving my first excel file with VBA code, with .xlsm extension (I was advised to do so), and then reopening that saved file, I realized that all the VBA code had disappeared and the cells in which I had used the user-defined functions threw errors. Saving the workbook as .xlsx instead of .xlsm also didn't help. When I tried saving the VBA module, it showed that FUNCRES.XLAM is read-only and hence cannot be modified, and so try saving it at a different location. Doing so, saved an excel file which on opening showed a pop-up message that it's corrupt so can't be opened. Then I gave all permissions to FUNCRES.XLAM and it is NOT read-only. But the problem still prevailed. What should I do? Can someone please help me?
PS: It is Windows 10, Office 2016.
Your VBA code needs to be saved in a module within the same workbook in which you are working. This will probably be listed as VBAProject(Book1)
There will likely be other projects listed in the Project Explorer window of the VBA GUI, but your code will not get saved with those modules.
These are related to add-ins, and not to your workbook.

XLA file not saving in Excel 2010

I'm using Excel 2010 and I have a .xla file with VBA macros, I edit the macros with the VBA editor, then save it. Later when I reopen the .xla file my changes are lost. On the internet I found other people with the same problem, e.g. MS-Excel VBA file (XLA) saving problem, but not solution.
please try to save it in the VBA-Editor. This ist what I have to do with xlam-files.

Unable to Close Excel Workbook without SaveAs Prompt

Hi there I have thorny little problem thats causing me a major headache, I have a section of code in VB.NET where I need to close the current Excel workbook, however whenever I make the call to:
'Now force a close of the active workbook without saving
_myXLApp.Workbooks(1).Close(Excel.XlSaveAction.xlDoNotSaveChanges)
The SaveAs dialog gets displayed... How do I prevent this from happening? My understanding of the code is that making the call as above should close the workbook without any SaveAs prompt. Any assistance much appreciated.
Kind Regards
paul J.
Try this instead:
_myXLApp.Workbooks(1).Close(SaveChanges:=False) 'Instead of Excel.xlSaveAction.xlDoNotSaveChanges
This should do the trick. Any time I've closed Excel workbooks in VB.Net this is the command I use. It actually mirrors the Excel VBA Format.

Resources