See Also Example
Used to divide two numbers and return a floating-point result.
Syntax
result = operand1 / operand2
Remarks
The operands can be any numeric expression
The data type The following are exceptions to this rule:
When both operands are Integer or Single expressions, result is a Single unless it overflows its legal range, in which case, result is a Double.
When both operands are Variant expressions of VarType 2 (Integer) or VarType 4 (Single), result is a Variant of VarType 4 (Single) unless it overflows its legal range, in which case, result is a Variant of VarType 5 (Double).
If one or both operands are Null Any operand that is Empty (VarType 0) is treated as 0.
Arithmetic Operators
Comparison Operators
Concatenation Operators
Logical Operators
Operator Precedence
Other Operators
VarType Function
The example divides 100,000 by 7 and returns 14,285.7142857143. To try this example, paste the code into the Declarations section of a form. Then press F5 and click the form.
Sub Form_Click ()
Dim Result As Double ' Declare variable.
Result = 100000 / 7 ' Divide numbers.
MsgBox "100000 divided by 7 is " & Result ' Display results.
End Sub