Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I add an hour to what the user types into the input box of the ("Enter
start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
add (1/24) or timeserial(1,0,0)
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... How do I add an hour to what the user types into the input box of the ("Enter start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how does that fit into the code? I keep getting errors.
"Bob Phillips" wrote: add (1/24) or timeserial(1,0,0) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... How do I add an hour to what the user types into the input box of the ("Enter start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like
With rng.Offset(0, 1) .Value = InputBox("Enter start time 24-hour clock") .Value = .Value + TimeSerail(1,0,0) .Font.Bold = True End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... how does that fit into the code? I keep getting errors. "Bob Phillips" wrote: add (1/24) or timeserial(1,0,0) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... How do I add an hour to what the user types into the input box of the ("Enter start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. Works great. I'm just learning this so bare with me.
"Bob Phillips" wrote: Something like With rng.Offset(0, 1) .Value = InputBox("Enter start time 24-hour clock") .Value = .Value + TimeSerail(1,0,0) .Font.Bold = True End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... how does that fit into the code? I keep getting errors. "Bob Phillips" wrote: add (1/24) or timeserial(1,0,0) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... How do I add an hour to what the user types into the input box of the ("Enter start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No problem. Just fire with next question when you are ready.
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... Thanks. Works great. I'm just learning this so bare with me. "Bob Phillips" wrote: Something like With rng.Offset(0, 1) .Value = InputBox("Enter start time 24-hour clock") .Value = .Value + TimeSerail(1,0,0) .Font.Bold = True End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... how does that fit into the code? I keep getting errors. "Bob Phillips" wrote: add (1/24) or timeserial(1,0,0) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "srroduin" wrote in message ... How do I add an hour to what the user types into the input box of the ("Enter start time 24-hour clock")? 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") rng.Offset(0, 1).Value = InputBox("Enter start time 24-hour clock") rng.Offset(0, 1).Font.Bold = True rng.Offset(0, 2).Value = InputBox("Enter stop date mm/dd/yyyy") rng.Offset(0, 3).Value = InputBox("Enter stop time 24-hour clock") rng.Offset(0, 4).Value = InputBox("Enter TSN to increase") rng.Offset(0, 5).Value = InputBox("Enter TSN to decrease") rng.Offset(0, 6).Value = InputBox("Enter MW Amount") Set rng = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I subtract 1 hour from one cell and input it another? | Excel Worksheet Functions | |||
help adding up hour totals on a logbook | Excel Discussion (Misc queries) | |||
Adding time over a 24 hour period | Excel Discussion (Misc queries) | |||
Adding on a 24 hour clock basis | Excel Worksheet Functions | |||
Adding hundreds of hour of time | Excel Programming |