Learn Excel - Video 327- VBA -Spin Button with Image control

preview_player
Показать описание
In an attempt to learn userforms very well, in this video we are talking about Spin Button and image controls.
Рекомендации по теме
Комментарии
Автор

Hi Ajay,

Can you please provide a video on how to create a duplicate a page with all controls in multipage userform in excel vba

aranyamajumdar
Автор

Hi Ajay could you please help on my query mentioned below.. Spin button consisting of time for selection.. 6:30 PM with submit button click

hopethedream
Автор

Hi Ajay,

I want to use spin button, input value as time i.e (06:00 PM). How to do this in userform.

I am getting output as number 1 in cell (B1).

Private Sub SpinButton1_SpinDown()
If TextBox1 = vbNullString Then
TextBox1 = "00:00"
Else
TextBox1.Value = Format(DateAdd("n", -1, TextBox1.Value), "hh:mm")
End If

End Sub


Private Sub SpinButton1_SpinUp()
If TextBox1 = vbNullString Then
TextBox1 = "00:00"
Else
TextBox1.Value = Format(DateAdd("n", 1, TextBox1.Value), "hh:mm")
End If
End Sub


Private Sub CommandButton1_Click()

Sheets("sheet1").Range("B1") = UserForm1.SpinButton1.Value


End Sub

hopethedream