View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Johnny[_10_] Johnny[_10_] is offline
external usenet poster
 
Posts: 30
Default Excel Calculation Question

I'm not using ActiveCell, Activate, or Select in any of the code. I
already have the Application.Volatile method in this function. The
funciton is only used four times in the entire workbook (which has many
sheets, and a fair amount of code, a couple of user forms, etc.) The
function is a validation mechanism that tests to see that the data
pasted in by the user matches what is currently in the database in a
summary fashion (the user actually uses another program to pull the
accounting system data that is ultimately pasted into the workbook, but
this independent test is necessary to make sure the user doesn't screw
up). I have a parameter that determines what test to perform, hence
the need for only one function.

I have a strong feeling that the vendor's code is the culprit, but what
really bugs me is that if I step through this code line-by-line, all
the evaluations work precisely as expected and the code returns as
expected. It only spits out the #VALUE error when a user subsequently
recalculates the sheet when the cursor is not on the cell.

Regarding Excel marking the particular cell as Dirty, is there anyway
to inspect/govern this process? I'm obviously going to have to do some
sort of workaround, and the only thing that comes to mind right now
(aside from attempting to figure out the vendor's undocumented API, or
going straight to Oracle and figuring out the vendor's table structure,
and write my own COM DLL, then reference that in Excel) is to put a sub
in the OnCalc event (if that even exists) and loop the culprit cells,
activating/selecting them, and calcing the application in between.
That's really going to have a performance hit and is totally a hack,
but I digress...

I'm going to go exclusively to Visual C#.Net and write my own UIs from
the ground-up after this one! Excel's quirks have really piled up on
me lately!!!! I wonder if that's jumping from the frying pan into the
fire from the perspective of getting stuff to users that they
thoroughly understand quickly?!?!?

Thanks,
Johnny