Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar
Hello
I have an application where I use a calendar on a userform (userform1). Im trying to have the user select a date, type in information into an inputbox and then get prompted again if they want to select another date, but (as you probably know), when I click on the calendar to select another date, the code runs again from the beginning. How can I have it prompt the user "do you want to enter another date?" ; up to a maximum of 5 times (when they select NO on the msgbox (vbNo), it should exit the loop. Thank you Terry V |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calendar
I did find "a" solution --- although many of you will agree; its not pretty:
Private Sub Calendar1_Click() Dim dte As Date Dim x As Integer Dim msg As String Dim results Dim tme As String Dim msg2 As String dte = Me.ActiveControl tme = InputBox("What time do you work?", "Input Hrs") UserForm1.Hide workinghrs = workinghrs & vbCrLf & dte & " " & tme msg = "Do you want to enter another day?" 'UserForm1.Show results = MsgBox(msg, vbYesNo) If results = vbYes Then UserForm1.Show Else msg2 = "Here are your hrs, please copy and paste them" & vbCrLf & workinghrs MsgBox msg2 End If End Sub Thank you Terry "Terry V" wrote in message ... Hello I have an application where I use a calendar on a userform (userform1). Im trying to have the user select a date, type in information into an inputbox and then get prompted again if they want to select another date, but (as you probably know), when I click on the calendar to select another date, the code runs again from the beginning. How can I have it prompt the user "do you want to enter another date?" ; up to a maximum of 5 times (when they select NO on the msgbox (vbNo), it should exit the loop. Thank you Terry V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert date from Gregorian Calendar to Hijri Calendar | Excel Discussion (Misc queries) | |||
find free sharware to include calendar pop or use calendar in cell | Excel Discussion (Misc queries) | |||
how do i export excel calendar info to outlook calendar? | Excel Discussion (Misc queries) | |||
excel calendar - list of names displayed on calendar | Excel Worksheet Functions | |||
import calendar items from excel into outlook calendar | Excel Discussion (Misc queries) |