B
bruce forster
I am using the following code from Power Programming but would like to have the spin button increase the textbox by 0.25 increments. Any suggestion
__________________________________________________
Option Explici
Private Sub UserForm_Initialize(
With SpinButton
' Specify upper and lower limit
.Min =
.Max =
' Initialize TextBo
TextBox1.Text = 0.2
TextBox1.Text = Format(TextBox1.Text, "#.##0"
End Wit
End Su
Private Sub TextBox1_Change(
Dim NewVal As Intege
NewVal = Val(TextBox1.Text
If NewVal >= SpinButton1.Min And
NewVal <= SpinButton1.Max Then
SpinButton1.Value = NewVa
End Su
Private Sub TextBox1_Enter(
' Selects all text when user enters TextBo
TextBox1.SelStart =
End Su
Private Sub SpinButton1_Change(
TextBox1.Text = SpinButton1.Valu
TextBox1.Text = Format(TextBox1.Text, "#.##0"
End Su
___________________________________________________________
Thanks.
__________________________________________________
Option Explici
Private Sub UserForm_Initialize(
With SpinButton
' Specify upper and lower limit
.Min =
.Max =
' Initialize TextBo
TextBox1.Text = 0.2
TextBox1.Text = Format(TextBox1.Text, "#.##0"
End Wit
End Su
Private Sub TextBox1_Change(
Dim NewVal As Intege
NewVal = Val(TextBox1.Text
If NewVal >= SpinButton1.Min And
NewVal <= SpinButton1.Max Then
SpinButton1.Value = NewVa
End Su
Private Sub TextBox1_Enter(
' Selects all text when user enters TextBo
TextBox1.SelStart =
End Su
Private Sub SpinButton1_Change(
TextBox1.Text = SpinButton1.Valu
TextBox1.Text = Format(TextBox1.Text, "#.##0"
End Su
___________________________________________________________
Thanks.