excel vba Getting error "Out of Memory" [closed] - vba

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am working on excel VBA. In my code I am downloading Multiple files say 50 one by one.
What I am doing, I'm downloading first file making changes doing some calculation and saving it as xlsx and after that downloading another file and doing calculation saving it as xlsx and so on. So After downloading 26-27 files I am getting "Out of Memory" Error.
Can anyone suggest me how to clear memory after downloading each file.
Thank you so much in advance

Perhaps consider setting your variables to Nothing? That way the objects will be destroyed and memory resource released.
There are a couple of posts that may give you some more insights. Worth checking them out.
When should an Excel VBA variable be killed or set to Nothing?
Excel VBA: Does destroying a collection of objects destroy every single object?

Related

why wont the arrows on my QDoubleSpinBox not work anymore? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
Currently developing a UI using python and Pyqt5. The for some reason both the QDoubleSpinBox's have stopped working via the arrows. The value is editable when clicked in and manually deleted and reentered but the arrows will not respond.
I have plenty of iterations of this code saved and I have gone back and compare versions where the spin boxes still work. I have google searched just about everything I can think of and no one has had a similar issue I guess. So kudos to anyone who may be able to help. Included below is a screenshot of the UI and the portions of corresponding python script that reference the spin boxes which yes, is very large.
P.S. for sticklers,
yes I know the layout is unorganized and ugly, this is by no means a finished product.
UI screenshot
[1](https://i.stack.imgur.com/hdW9o.png)
[2](https://i.stack.imgur.com/xRmkW.png)
[3](https://i.stack.imgur.com/iCdAr.png)
[4](https://i.stack.imgur.com/B2Vuf.png)

Where is code I get in MS ACCESS in MDB or MDE file extension [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I m newly to the MS access, I didn’t getting where is the code see and edit. So I can login to my application.
When try open the my application in .MDE in MSAccess I am getting authorisation error-> your login is unauthorised please try again later.
Please answer me
An MDE file is an old compiled version of an MDB database. As such you cannot normally get at the code, so if you don't have the original MDB file you are in trouble! These people provide a commercial service to restore a MDB from a MDE. I have never needed to use them, so cannot comment on how reliable the result is.
Open the MDB file.
Press Alt+F11 to open the VBE, the VBA code editor.
That's where your code is.

Can't open Access database file on our Windows Server, but locally is no problem [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I've automated some old access files at work. (What previously was clicking a button in a form, waiting an hour, repeat 4 times, is now running it all one go on open, then closing and compacting the database).
The files are stored on a shared drive that is locally on the server that we try to run them on.
I can run the files on my PC, both while on the network and through VPN. I cannot, however, run them on the server. When i open them, access starts up and shows the getting started-view and nothing happens.
When running them through a scheduled task, as intended (they take a few hours, so the idea is to run them during the night on the server), I just end up with a locked access file and a process with no GUI for access that further hinders removal of the lock file. After a weekend, I have 9 processes and all the files have locks and nothing is run.
The weird part is that I get no error messages. Furthermore, just a few weeks ago, when I was building them, I could run them, but they'd only perform half of the VBA scripts (it's exporting a couple of CSVs for example, and they didn't generate new ones, when run on the server, but keep working fine from my PC). Then, after a week off from work, the above stated behavior began instead.
At this point, I've probably spent a whole work week troubleshooting this and gotten nowhere. Any help is appreciated. Haven't found anything from google searches that matches this behavior...
In a strange tun of events, it appears to be working now. Found that Office hadn't installed all updates. Did that and it began to work....

System.NullReferenceException Epplus Opening Worksheet [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I am using Epplus to try to open and read a spreadsheet -- a regular spreadsheet with four columns in xlsx format. I run my code, get the Null Reference error, then tell it to resume and the error is gone. It's like the package isn't fully loaded. I've tried .Sleep(5000) but that doesn't work. I've tried it in and out of USING statement.
if (!File.Exists(FileName))
{
return;
}
ExcelPackage pkg = new ExcelPackage(new FileInfo(FileName));
ExcelWorksheet ws = pkg.Workbook.Worksheets.First(); <<-- ERROR HERE
Any help, advice or insight would be greatly appreciated.
I'm posting this in case anyone else has this problem. I created a new Excel File and it worked. I tried it out on a bunch of other files and it worked.
The problem was specific to this file. I don't know if it was because it had special formatting or several sheets -- whatever it was, a particular Excel file was creating the problem.
I think EPPLUS cannot handle .xls (or the old excel type), I resolve mine too, when i save a new copy that has .xlsx file type. and it works!

Read VBA macros (or vbaProject.bin) of an Excel file without opening it in MS Excel [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I would like to analyze Excel files, especially those which contain VBA programs inside. because I plan to run this analysis on lots of Excel files one by one, I don't want to open these files within Microsoft Excel to analyze them.
One difficulty is to find and parse the VBA macros of an Excel file. We know that an Excel file can be converted to .zip file which contains lots of .xml and vbaProject.bin, it is pretty certain that VBA macros are in vbaProject.bin. However, the problem is how to read it?
Does anyone know if there is any tool or API to find and parse the VBA macros?
Does anyone know if there is any tool or API to read vbaProject.bin?
There is a very large PDF from Microsoft which documents how to extract functions from the vbaproject.bin:
https://interoperability.blob.core.windows.net/files/MS-OVBA/%5bMS-OVBA%5d.pdf [Source]
This resource is current & available as of June 27, 2019. The event that this link goes stale (Microsoft periodically changes their permalink structure or otherwise alters how they implement their documentation/answer repositories, etc.), search for MS-OVBA.pdf.
Some additional information which may or may not be complimentary to the above:
http://www.codeproject.com/Articles/15216/Office-2007-bin-file-format
Here's an article updated in 2017 that lists several tools for helping with this. I was able to extract the VBA code out of a vbaProject.bin using the OfficeMalScanner tool. Edit: some months after successfully using this tool, Windows is detecting malware in it. The link was www dot reconstructer dot org / code / OfficeMalScanner.zip. Use at your own risk - it worked for me to extract a bunch of needed VBA code from the project after the source was lost. Edit 2: per #HackSlash comment below, probably a false positive.