LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Fortune 40 analyst seeks explanation for Excel/VBA quirk

My wife is an analyst with a very large company. She has recently changed
groups within the company and inherited responsibility for about 400
worksheets, each of which contains a Validate subroutine. She's a good
programmer -- comp. sci. from Cornell; C doesn't scare her -- and she's been
cleaning up and extending Validate for the past few weeks. Now she's doing
testing for a new release. All 400 worksheets will be rolled out to the
users at once tomorrow, with the new Validate code in place.

Except...she ran one test too many. Here's the e-mail I got:

I have an Excel "template" spreadsheet which has several macros
associated with it.
In particular, there's a subroutine StandAloneValidate, which is
associated with a
shortcut key, which has 3 lines of code:

Dim RC as Boolean
Call Validate(RC)
End Sub

The Validate subroutine has lots of logic, calls several functions, etc.
I've added
lots of functionality to it in the last few weeks. It's been working
nicely.

Today something odd happened:

I did a bunch of testing with spreadsheets that had just been
created/updated
with the VBA in my template spreadsheet. They worked correctly.

I edited the VBA code throughout to add comments -- nothing more.

I brought this updated code into my "test" spreadsheet.

I ran the StandAloneValidate macro.

I got an error on the Call Validate(RC) line of code; the error
occured on the
return from the Validate subroutine. I didn't write the error down,
but it was
something about a problem calling a DLL function.

The error occured both from running the code in the VBA environment,
and
running it from the spreadsheet using the shortcut key. Rebooting
didn't help.

I renamed the Validate subroutine to ValidateData, and the problem went
away.

I renamed it back to Validate just to see -- well, just to see. Ran just
fine.
No problem.

Now I can't reproduce the error. Going back to an older version of the
code
and pasting in my edits doesn't cause the error. (I didn't save a copy of
the
spreadsheet when it was causing the error!)

Any idea what caused my error? Any idea of if it will recur, or how I can
prevent it from recurring? Any thoughts at all?

The real problem here is that my wife's boss is from the mainframe world,
doesn't understand that Windows programs just do this sort of thing
sometimes. He reasons -- logically -- that if it happened during testing, it
can happen during deployment. The fact that my wife has now tested her code
on all 400 worksheets -- repeated all her regression testing -- doesn't
impress him. The code failed once, after all. And no one knows why. So no
one can say that it won't happen again. That's his position, and of course
it's reasonable.

But...this is a first major project for my wife, so she is undergoing some
evaluation. Excel/VBA are undergoing ongoing evaluation, as is, I suppose,
the Windows platform itself. Excel is too good a tool to fail this
test...and yet, the boss's request for an explanation of the error is
reasonable.

(Yes, we'll be making screen shots of error messages from now on. Whoops.)

--
Every normal man must be tempted, at times, to spit on his hands, hoist the
black flag, and begin slitting throats.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANALYST TOOL PACK -- #VALUE! Paulo Excel Worksheet Functions 1 October 13th 08 10:55 PM
An Interesting vba Excel quirk GeorgeJ Excel Discussion (Misc queries) 7 August 14th 07 02:11 AM
Crime Analyst needs help with co-ordinates sevil_gp Excel Discussion (Misc queries) 2 October 7th 05 02:16 PM
newbie seeks excel help - please!! earthgirluk New Users to Excel 2 June 23rd 05 12:54 PM
Installed Analyst Toolpak but not working for files used at work? SJB567 Excel Worksheet Functions 2 May 14th 05 06:50 PM


All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"