Excel very slow after second time being opened - performance

I have an excel workbook with LOTS of macros.
If I have Excel App. FULLY closed, and I open it, it runs fine.
However if I close the workbook (without closing excel app.), and then I open it again, there is a huge delay when opening, and also while running all the different macros in it.
I have nothing running at the beginning or on the background. In fact, I have put a flag on the thisworkbook Workbook_Open routine....
Just to get to this point (workbook_open event) it takes over 20 seconds! And no macros have run yet !
So to summarize, if opened from scratch (excel app is NOT running), it takes 2-3 seconds for workbook to be opened and ready.
Everything runs fast (macros, etc)...
Then I close the workbook...
If opened again (while Excel already running) takes 15-50 seconds.
Basically anything while working (macros running, etc) takes x 10 longer
If I close Excel app. totally and open it again, it runs nice again (the first time)
I am thinking maybe the workbook has something which affects the memory and the second time it is opened it is affecting it...
But I have no idea, it is just a guess...
Has anyone experienced this ?

Thanks Jook...you send me on the right track and I fixed the problem...
I did a Google search based on "memory leaks" as you mentioned and found some links which advises about the importance of set xxx=nothing
I didn't think it was much of a problem and never thought it could cause such delays (in fact I have lots of other macros/workbooks and never had this problem)
Incredibly that was it, a missing set xxxx=nothing
I went though all the code which run on workbook_open event.
I made sure set xxx=nothing was set on all (I found two missing)
Although it didn't affect the program from running correctly (first time opened), when closing it and reopening it again, that's when it caused a problem ! Weird.
But it is now fixed thanks to you !
I hope this post it helps someone else in future

Related

I deleted the home page in my Oracle application express how can i recover it?

I'm still a newbie in this so I still don't know how things work.
Will it affect anything if i made a new page called home?
or can I recover it?
No problem in creating a new page.
Alternatively (though, now is probably too late), you can
export the application as of "n" minutes ago (if you deleted it right now, "n" could be 5 minutes, for example)
drop the application
import it back
and you'd have the lost page again.
Can you explain your problem a bit further?
I can recommend to read trough the links below.
https://docs.oracle.com/cd/B14099_19/core.1012/b13995/br_intro.htm
https://apexplained.wordpress.com/2012/07/12/recover-a-deleted-apex-page-or-application/

Slow shutdown of VB ocx file with MSVBVM60.dll after converting from VBscript to JScript

We have an application that currently works on IE browsers till IE10version.
We have a challange to move towards IE11 as VB support is removed from IE in standard mode.
We had lots of VB scripts that were converted to JScripts. The application also loads VB6 active x components.
After conversion from VB script to JScript, the application runs fine except in places where VB6 active x components are being loaded.
The application crashes every alternate time with "out of memory" issue and does not load the ocx file.
Note: this happens every alternate time.
I used ProcMon tool to see what was happening. I see when the active x component is loaded, the ocx file is loaded and another dll MSVBVM60.dll is also loaded. when the active x component is Shutdown, the MSVBVM60 is also cleaned up along with that.
The next time when we try to load the active x component, the ocx file and MSVBVM60 are not loaded at all and we see the out of memory issue.
We tested the application by opening and closing the active x control once and then waiting for around 30 seconds and then try launching the active x control. This time it worked. With this we felt the component is taking time to shutdown/unload.
If we try to launch the control before it shuts down, the application is giving that error.
This never happened with VB script code.
Is there any relation with MSVBVM60.dll with VBScript that makes it to unload faster compared to JScript?
We could not find any code specific that was different in VB script and JScript.
I need your inputs to think in the right direction. Please help.

Processing, window gets distorted

Just downloaded Processing on a laptop using Windows 7 64bit. This is the very first and basic work that is being done inside of processing itself.
So far, I am trying to re-create the example from the processing tutorial on the site here:
Processing Example.
When doing that simple example my window becomes distorted as soon as I do the following seen in this picture here:
I am completely unsure of why this is happening and sometimes as soon as it does happen, I cannot get it to go away, even after moving the ellipse to another area.
Any ideas?
You have two tabs in there. Unlike in a more traditional IDE, Processing considers all code from all tabs part of the same sketch, so it'll run all the code you have in those tabs. Not just the size/rect/ellipse calls, but also everything in that "test" tab. Fire up a new instance of Processing and just add the size/rect/ellipse calls (or delete the test tab). If it doesn't do weird resizing, problem found.

In VS2010 is there a way to correct the cursor icon from getting stuck on pointer without restarting the page?

I am working along in VS2010 and moving code around to make more functions and less clutter, so I copy/paste nine times out of ten my mouse cursor "locks up" and it gets stuck on the arrow pointer rather than the | for text, which is only mildly annoying when you are trying to copy/paste a lot of code around. It clears up whenever I close the file and reopen it, but it interrupts my work flow. Has anyone run into this before, if so, did you figure out how to fix it without closing the file?
I submitted this as a report to MS. I am paraphrasing here, "it is in the bug list and we will look into it."
The only solution is to close the file and re-open it. If MS replies with anything else I will post it here.

How to subtly inform a user his input was received

I'm writing a DLL that is automatically injected on load in a specific application. Because I'd like to run the program while working on it, and my users might want to load the program without it in specific cases (e.g. bug hunting), I sometimes want to prevent loading the DLL.
Currently I do this by checking GetKeyState for VK_LCONTROL, VK_LSHIFT , and VK_LMENU on load, and if all are down, I silently unload myself.
However, it can take quite a few seconds for the program to load and to see if the DLL was loaded or not, so I want to inform the users when we're unloading. I've considered a MessageBox, but that's too disruptive. I've tried MessageBeep, but that didn't seem to do anything on my setup. Currently I'm using a simple dual beep (Beep, Sleep, Beep) to indicate unloading, but that will probably become rather annoying to my co workers. I've also considered a system-tray icon, but that would introduce a lot of code and bug potential, while I'm aiming for a minimal notification as to not introduce any subtle bugs.
Would anyone else know a subtle way (preferably visual) to inform the user that their input has been succesfully received?
Given the limited scope of your goal, this might actually be an appropriate use of a taskbar notification balloon tip.
Edit: Added link the Joe posted in his concurring answer. Thanks, Joe! :)
If your app has a status bar at the bottom, you could place some message text there...
Have you considered a timed messagebox that closes itself?
http://www.codeguru.com/cpp/misc/misc/messageboxhandling/article.php/c203
You could open a window with a short message and close it automatically again after 0.5 seconds or so. It doesn't need user interaction so I don't think it's very disruptive.
Change the window title, then change it back afterwards. Then you can see the change even if the user has Alt-Tabbed over to some other program in the meanwhile, without stealing the focus from the user.
Concur with Greg D.
Look here: http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/15cbdc8d-fde3-44ab-bbbc-e50cb2071674/
Two ideas:
Turn it around. Have a visual indication when the DLL is loaded, and have the absence of the indicator let you know that the DLL has been unloaded. Perhaps a suffix in the title bar. That way, you can tell at any time, not just during startup.
FlashWindowEx.

Resources