Macro-Enabled workbook running slow/ Crashing - excel

I have been creating a tool in excel that is based around data entry by a user from a userform. This entire program and the transformations done through vba span approximately 950 lines of code. Addionally, I have several power queries built to generate live-updating stats as new data is entered. The file as a whole is 64,597 KB. Currently, when I open the file it takes a descent amount of time to open with some "Excel not responding" errors before resuming the opening process. I am nervous that once I roll out this program to the users that it may "break." I am still fairly new to programming and don't have much formal training for best practices, so any tips for improving the speed/efficiency would be greatly appreciated!

Related

How to make Excel run in multi-CPU mode

I have big excel files, thousands lines and rows.
Gigs in size.
When i do work inside this files in excel, it throttling and lagging. Sometimes just get stucked ans freeze.
When i open a task manager, i see that Excel didnt eat even a one CPU.
RAM usage also not overloaded.
How to make excel use all my cores?
Excel 2019.
I see you are familiar with Python. Why don't you move your databases to Python? Actually I don't know capability of it. I work in R. Some of my data in Excel and even in *.csv take 100-200 Mb, while in *.Rdata format the same information is less then 5Mb. R functions work faster then heavy Excel.
And yes, how to make excel use all cores of processor is interesting to me too.

How can I build an event recording

In my organization (Baggage handling system), we need to record every error occur in the system, it is a new system so we are using paper to record the errors.
what I need is to build a program that makes things easier.
An error recorder program, which store the value in an excel sheets (backup) and can also export a daily report that contain all the errors that occur in one day in excel sheet.
in general specking : how to make a program interact (input, output) with excel sheets? and which is better to me Java or VB .net?
Thank you all in advance.

Avoid data base open when excel is running

I developed a vb.net program that uses excel file to generate some reports.
Once the program takes too much time to generate a report, I usually do other things while the program is running. The problem is that sometimes I need to open other excel files and the excel files used in the program are shown to me. I want to still hide those files being processed even when I run other excel files. Is this possible? Thanks
The FileSystem.Lock Method controls access by other processes to all or part of a file opened by using the Open function.
The My feature gives you better productivity and performance in file I/O operations than Lock and Unlock. For more information, see FileSystem.
More information here.

How to improve MFC fprint writing performance?

I’m writting an MFC GUI program that plots graphs in real time when it receives new data. It comes 30 data per second. I’m adding a new function where writing a text file using fopen and fprint every time it receives new data. So, it creates 30 new text files per a second.
Because of the writing function, the problem is that the program looks pause, not updating the graphs in real-time. when I turn off the writing function, it works well.
How can I resolve the problem?
I appreciate your help in advance. Thanks!
Writing to a drive tends to be slow because of the OS/hardware. There used to be this thing called a RAMDISK. Basically a device driver that made a drive letter in ram. After the files are written they could be copied to a new location hard drive or SSD location. Opening and closing files take up operating system resources. It's hard to know your programs design from your description...

Does Monitoring An Excel Spreadsheet Via RDP Make It Slower?

We have a massive spreadsheet which does a lot of calculations and not much drawing / writing to spreadsheets
My question is : Does monitoring the spreadsheet whilst it is running via RDP actually make this slower??
Put differently if rdp was disconnected would this result in improved speed??
I've actually done a lot of work from home via Remote Desktop that involved an Excel Workbook (and Access Applications) doing lots of hefty calculations. From my experience, I didn't notice any slowdown in the calculations on the Excel sheet, but occasionally the connection would slow and anything that refreshed the screen a lot would make the PC difficult to use.
The most important thing, however, is to write code that modifies the visual elements of the screen as much as possible. For example, instead of looping through a bunch of cells and setting each one as the active cell to find its value, loop through a set of range values that don't require the sheet to refresh. This, by far, has created the biggest performance boost in my VBA code.
If your code is already fairly optimized, you'll probably not see any difference monitoring it over RDP. However, if monitoring is your issue, you ought to consider outputing data to a separate Excel or Text file that might be stored on a shared server. If done correctly, I imagine that would have a smaller impact on your CPU than RDP. THis will still allow you to monitor the progress of the Excel application without having to log in.
Just look at the CPU usage of Excel and the RDP server. If Excel isn't getting its 100% while calculating, or if the RDP server seems to be using too much... then yes, RDP is making things slower.

Resources