May. 29th, 2012

plonq: (Kinda bleah mood)
Something that I do a fair bit of on this job is combining data from various sources in Access and then pushing it out to Excel and publishing it from there. Normally it works very well, but there is a vexing issue that has caused me a lot of grief over the years.

Sometimes, with no apparent motive that I could find, Excel would remain active in the background, even after I sent it Close and Quit commands. The only way to get rid of it would be to go to the task manager (or Process Explorer in my case) and manually kill it. In some cases this idling version would interfere with other jobs I was trying to run, and other times it would not. This time it did - usually. Either way, it then stacked another idle version of Excel.exe in the background because I obviously needed more ghost processes running.

I finally got pissed about it enough today that I did some research thinking that I could not be the only person encountering this frustrating feature, and I found plenty of hits. Good. More hits increased the odds that I would find a useful answer buried in the usual forum stupid. By "usual forum stupid" I mean answer like these:

"I know you were asking about VBA, but here is the solution in C#"
"I can't reproduce the error."
"Have you tried [something he has obviously tried because it's in the source code he provided]?"
"Have you tried X?" "OK, I tried X and it did not work." "How about X. Did you try that?" "That's the same fucking thing." "I know, but it works for me."

Anyway, after wading fruitlessly through the usual sea of unhelpful responses, was skimming through answers so quickly that I almost missed the one I needed. About three years ago somebody was having the same problem in Excel 2007, and one of the guys in the forum offered up what he thought seemed like a reasonable answer.

"My hunch is that you that you have something that is not tied to an instantiated object. You need to tie everything to the object otherwise Access instantiates another instance of Excel which it then uses for those non explicitly referenced items."

I am pretty good about that, but I poured through my code a few times and then spotted it:

.xlSheet.Range(Cells(iRow,iCol1),Cells(iRow,iCol2).Merge

I fixed it, and the problem went away. I have some other reports that I need to fix (so that I can get rid of the job I created whose sole purpose is to go through every evening and nuke all of these lingering instances). Now if you will excuse me I need to go cut myself.

Mushrooms

May. 29th, 2012 10:52 pm
plonq: (Disapproving Luna Mood)
If we had not deviated from our usual route through the park this evening (opting to take the longer path) I would not have seen this little cluster of photogenic fungi. With the cool, wet weather we have been experiencing this spring I expect we will be seeing more of these.

They are not normally this orange, but the sun was very low in the sky casting a wonderful golden glow over everything.
20120528
If this weather keeps up, it should be a bumper year for chanterelles at the farmers' market this year. It might not be such a bumper crop for other things, though. Earlier this spring the farmers in the area were concerned because it was so dry - especially on the back of a very dry summer last year, and a lower-than-average snow fall this winter.

Now they are concerned about flooding. I feel for them.

Ocean King is quite a pleasant little Chinese restaurant just a few blocks from here. I would not rate it as the best Chinese restaurant in town, but it is quite good. I love it for its dated, 70s pizzeria décor. I also love that the owner always throws an extra treat or two into the bag when we package up the rest of our dinner to go.
20120527
I was born in the year of the rabbit (a water rabbit to be more precise). According to the Chinese zodiac, I pair well with a pig or dog, but even better with a white wine and a cream sauce.

August 2025

S M T W T F S
     12
3456789
10111213141516
171819202122 23
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 6th, 2026 10:18 am
Powered by Dreamwidth Studios