View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Works if I single step

Posting the code helps, otherwise we are working blind.

--

HTH

RP
(remove nothere from the email address if mailing direct)


";-)" wrote in message
...
When I run a Work.xls by hand the results are good. (A manual data entry
sheet with calculations)
When I single step thru the code my VB calling, automation code and the
Work.xls the results are good.
When I run the VB program that calls the Work.xls, then the spreadsheet

has
and returns the wrong values.

my first guess at things to change are to include some
1: DoEvents, around things like Vlookup, and Application.function
2: Change to explicit variable definitions (Client supplied the original
code).
3: Change things like which sheet is actively displayed.
4: ?????

This VB code / Excel combination is in a running app that has been stable
for over 2 years. I did change the name of two variables about the time
this started, but I have checked and I don't have conflicting variable

names
in different modules and this name change was duplicated in a dozen other
sheets with no problems.


SO just some suggestions on things to change / look for when single

stepping
thur code works and running does not.