Okay!!! I'm currently learning to code. My problem...
I'm making a simple formula for the results of a Response Rate to a Subscriber Base. Now... When I use 1000 as a Subcriber Base and multiply by 2.00 as the Rate of Response, I receive '20' in my text box. The correct answer.
But when I change the Rate of Response to 2.50, I still get 20 as an answer! Not '25'!. If I use 3.00 as a Rate of Response I receive 30! Again a correct answer. Where am I rounding my decimals???
Here is what I'm using. (Don't laugh, I'm a new guy remember!)
***********************************************************
Dim intResp As Integer
Dim lngSubscr As Long
intResp = txtRate.Text
lngSubscr = txtSubscribers.Text
'intResp is response percentage to subscribers as entered by User.
'lngSubscr is the total number of subscribers as entered by User.
txtAnswer.Text = (intResp * lngSubscr) / 100
***********************************************************
I've read and tried different Formats without any luck for the last 2 hours. Now it's time to go meet some friends.
I did use the "Percent" Format for a different excersise, to return a Value with a percent sign. It worked okay.
And one last thing... How do you write your code within these forums to show the Blue, Green and Red colors???
Thanks!
P.S. I'll give back to others as I learn myself!![]()





Reply With Quote