K
Karen53
Hi,
Could someone tell me why my value is rounding up to whole numbers, not
allowing decimals, i.e. 1.50 or 1.75 etc?
Sub EditAllowedVariance()
Dim HasPswd As String
Dim NuAllowance As Long
HasPswd = InputBox("Enter Password", "Password")
If HasPswd = "" Then
'do nothing
Else
If HasPswd = MyPassword Then
NuAllowance = Val(InputBox("Enter desired allowed variance",
"Enter Variance"))
GrossUppg.Range("I2").NumberFormat = "00.00"
GrossUppg.Range("I2").Value = NuAllowance
Else
MsgBox "Incorrect Password"
End If
End If
End Sub
Could someone tell me why my value is rounding up to whole numbers, not
allowing decimals, i.e. 1.50 or 1.75 etc?
Sub EditAllowedVariance()
Dim HasPswd As String
Dim NuAllowance As Long
HasPswd = InputBox("Enter Password", "Password")
If HasPswd = "" Then
'do nothing
Else
If HasPswd = MyPassword Then
NuAllowance = Val(InputBox("Enter desired allowed variance",
"Enter Variance"))
GrossUppg.Range("I2").NumberFormat = "00.00"
GrossUppg.Range("I2").Value = NuAllowance
Else
MsgBox "Incorrect Password"
End If
End If
End Sub