Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
-\) -\) is offline
external usenet poster
 
Posts: 18
Default Works if I single step

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.




  #2   Report Post  
Posted to microsoft.public.excel.programming
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.






  #3   Report Post  
Posted to microsoft.public.excel.programming
-\) -\) is offline
external usenet poster
 
Posts: 18
Default Works if I single step

Well there is much too much code to post. The completed Excel sheet is
another companies property too. To make it fail tho you need to install my
VB controller program. That would require a day to set up.

I am just wondering what type of things to look for when code works when
single stepped and not when run at full speed. It also works if you
operate it with Excel and without my controller code.

All my controller code does is call a public function and pass a recordset
object, this object has a 16 digit model number which gets put in the one
cell on the user data entry sheet, and event fires and the rest of that
sheet calculates and electrical rating plate's info. After I set that cell
and do a Doevents, I just fill in the rest of the recordset with the other
cell data on that sheet.



"Bob Phillips" wrote in message
...
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.








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Works if I single step

My experience suggests that when a program works when single stepping, but
not when run through, is due to the user changing something even if
inadvertently, such as selecting an Excel sheet.

There is no intrinsic reason why they would differ that I know of.

--

HTH

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


";-)" wrote in message
...
Well there is much too much code to post. The completed Excel sheet is
another companies property too. To make it fail tho you need to install

my
VB controller program. That would require a day to set up.

I am just wondering what type of things to look for when code works when
single stepped and not when run at full speed. It also works if you
operate it with Excel and without my controller code.

All my controller code does is call a public function and pass a recordset
object, this object has a 16 digit model number which gets put in the one
cell on the user data entry sheet, and event fires and the rest of that
sheet calculates and electrical rating plate's info. After I set that

cell
and do a Doevents, I just fill in the rest of the recordset with the other
cell data on that sheet.



"Bob Phillips" wrote in message
...
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.










Reply
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
Creating a Drop Down List with Step by Step Instructions for 2007 remarkable Excel Worksheet Functions 2 March 22nd 09 04:36 AM
Excel 2002: Can I protect the whole file in a single step ? Mr. Low Excel Discussion (Misc queries) 3 August 30th 07 02:12 PM
Excel 2002: Single step of selecting characters Mr. Low Excel Discussion (Misc queries) 5 May 4th 07 05:12 PM
I need step by step instructions to create a macro for 10 imbedde. diana Excel Worksheet Functions 3 January 31st 05 01:56 AM
Single Step Dialog Box Michael Thompson Excel Programming 3 December 10th 03 09:58 PM


All times are GMT +1. The time now is 02:27 AM.

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

About Us

"It's about Microsoft Excel"