bsher

New Member
Joined
Jul 20, 2015
Messages
8
I've got a code that searches a loads database, takes the numbers and puts them into a calculator, gets a number from the calculator and then adds that factored load to another database.

To perform each of the major steps in my code, I call a function. Now when I call each function in order, manually, I get the correct answer I should get according to my hand-calcs. However, when I run them through the macro that calls each function automatically, I start having problems. The final result I get just doesn't make sense, it doesn't come from anywhere in particular and neither does the number.

The code that I have is very large, I'm not sure if anyone would be willing to take a look so I haven't posted it. I can if there's interest.

What I mostly want to know is if excel usually has issues working with large codes that call other functions.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
cells(1,1)=999
call macro2
end sub


macro2 is cells(2,1)=888
call macro 3
end sub

in these terms, what is your question ?
 
Upvote 0
Usually they work fine. I think yuo need to check ones more your functions and take in consideration that if it is doing different operations you may have to group them.

15 + 10 * 2 = 35
(15 + 10) * 2 = 50

otherwise if you defined some variable as integer will not consider the decimals so you may have to change the datatype. this are the first things that come in my mind.
otherwise you should check step by step your coding to see exactly in which point of the calculations the thing goes wrong.
if you put some coding or more data i think it will be more possible to have someone who gives you the right hint.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top