youcanreachtrevor
New Member
- Joined
- May 17, 2018
- Messages
- 5
Having trouble googling this querry as the Variable name Single is very common.
Basically I have code that looks to see if the value in the cell is non zero, and if it is non zero then I add my variable (obtained elsewhere) to the existing .vale from the cell.
But somehow the adding isn't working. my variable is declared publically in the Sub, the code below is running within a Private Function initiated from a User Form.
I see for example 34.07 + 44.05 = 78.1125 or something like that...?
Any help is appreciated.
Thanks
Basically I have code that looks to see if the value in the cell is non zero, and if it is non zero then I add my variable (obtained elsewhere) to the existing .vale from the cell.
But somehow the adding isn't working. my variable is declared publically in the Sub, the code below is running within a Private Function initiated from a User Form.
I see for example 34.07 + 44.05 = 78.1125 or something like that...?
Any help is appreciated.
Thanks
Code:
Public Sub Qin_Click()
Dim QINCell As Single
Dim Interim As Single
If NISSCADactuals.Range("E12").Value = "" Then
QINCell = 0
Else: QINCell = NISSCADactuals.Range("E12").Value
End If
MsgBox ("TotalDebitNum: " & TotalDebitNum & " | QINCell: " & QINCell)
NISSCADactuals.Range("E12").Value = TotalDebitNum + QINCell
MsgBox (NISSCADactuals.Range("E12").Value)
Call CreditDebitIteration
End Sub