what code to use if incase i want to divide a number from textbox1 to textbox2.
textbox1 = 10
textbox2 = 0.02
textbox3 = textbox1 / textbox2
i did my own code but it gives error about "cannot divide by zero"
thanks in advance
Last edited by macky1730; 10-02-2010 at 10:21 AM.
Please post your code, and remember to use code tags.
Anyway, DIM is used to declare variables and is used at the beginning of your code modlule. for example:
--Sub Test() Dim MyVar as Single Dim MyOtherVar as Double MyVar=textbox1.value End Sub
Note that Integer variables can only hold whole numbers ranging in value from -32,768 to 32,767
Longs hold whole numbers from -2,147,483,648 to 2,147,483,647
Singles hold decimal valued numbers with as many as 38 to 45 decimal positions
Double type numbers can have several hundred decimal places
---
Ben Van Johnson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks