Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
0.1 of Double and 0.1 of Single are not same and not just 0.1. See http://support.microsoft.com/default...kb;en-us;78113 Floating-point arithmetic may give inaccurate results in Excel (BTW, "0001100110011100110011 (and so on)" is wrong.) You should use Double type for cell values, like: Dim aa As Double -- HTH okaizawa staying wrote: Hey, guys. I was setting up an inputbox for percentile value input, and the weirdest thing happened. The code follows. ==================== Option Explicit Sub inputboxtest() Dim aa As Single aa = Application.InputBox(Prompt:="Type in 10 for 10 percent", Type:=1) / 100 MsgBox aa ActiveSheet.Range("a1").Value = aa End Sub ==================== |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Percentage equals 0 error | Excel Worksheet Functions | |||
count if equals first non error cell | Excel Worksheet Functions | |||
Validation - Error message if equals Left formula | Excel Worksheet Functions | |||
custom filter does not work when selecting 'equals' X AND 'equals' | Excel Discussion (Misc queries) | |||
inputbox msgbox error | Excel Programming |