LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation boxes, outputting a final number from the boxes MDH Excel Discussion (Misc queries) 1 November 16th 06 12:41 AM
Moving. Want to number boxes and inventory contents of boxes [email protected] Charts and Charting in Excel 1 August 29th 06 09:48 AM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
Looping Macro with input boxes all related to one number Jeremy Excel Programming 0 October 26th 05 04:40 AM
Mask input in input boxes? Eric[_14_] Excel Programming 4 November 29th 03 11:10 AM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"