Hi,
The following code is supposed to populate a spreadsheet with two items formatted as %. However, regardless of the content of the texboxes the spreadsheet populates both ranges with 0%.
Private Sub cmdAddRamp_Click()
Range("deRamp1Line1").Value = Val(frmvariables.txtQtrsRamp1Line1.Value)
Range("deRamp2Line1").Value = Val(frmvariables.txtQtrsRamp2Line1.Value)
Unload Me
End Sub
Private Sub sbRamp1Line1_SpinUp()
Dim n As Double
n = Val(frmvariables.txtRamp1Line1.Value) + 1
frmvariables.txtRamp1Line1.Value = Format(n / 100, "0%")
End Sub
Private Sub sbRamp1Line1_SpinDown()
Dim n As Double
n = Val(frmvariables.txtRamp1Line1.Value) - 1
frmvariables.txtRamp1Line1.Value = Format(n / 100, "0%")
End Sub
Private Sub sbRamp2Line1_SpinUp()
Dim n As Double
n = Val(frmvariables.txtRamp2Line1.Value) + 1
frmvariables.txtRamp2Line1.Value = Format(n / 100, "0%")
End Sub
Private Sub sbRamp2Line1_SpinDown()
Dim n As Double
n = Val(frmvariables.txtRamp2Line1.Value) - 1
frmvariables.txtRamp2Line1.Value = Format(n / 100, "0%")
End Sub
Any ideas?
Thanks,
Andrew
Bookmarks