Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing number of input boxes???
I have the following code. The user puts in start date/time and stop
date/time. I am trying to get it so that it will prompt the user with start time, stop time, and MW amount input boxes for every hour between the initial and final start stop times. For example initial start time is 11:00 and final stop time is 15:00 I want it to have input boxes for 12:00, 13:00 and 14:00. I don't know how to do this since the number of input boxes will change with the amount of time before initial start and final stop. How do I do this????? I appreciate any help I can get. Thx. Private Sub Hourly_Click() Dim rng As Range Set rng = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Offset(1, 0) rng.Value = InputBox("Enter start date mm/dd/yyyy") With rng.Offset(0, 1) .Value = InputBox("Enter initial start time 24-hour clock") .Value = .Value + TimeSerial(1, 0, 0) End With rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") With rng.Offset(0, 3) .Value = InputBox("Enter final stop time 24-hour clock") .Value = .Value + TimeSerial(1, 0, 0) End With rng.Offset(0, 4).Value = InputBox("Enter MW Amount") rng.Offset(0, 5).Value = InputBox("Enter TSN to increase") rng.Offset(0, 6).Value = InputBox("Enter TSN to decrease") Set rng = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data validation boxes, outputting a final number from the boxes | Excel Discussion (Misc queries) | |||
Moving. Want to number boxes and inventory contents of boxes | Charts and Charting in Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
Looping Macro with input boxes all related to one number | Excel Programming | |||
Mask input in input boxes? | Excel Programming |