title: Working with dates in Visual Basic / Excel
body: <p>Very new to working with Visual Basic / Excel. I am trying to write a quick script that enters the current time in one column, and allows the user to enter how many days/hours/minutes will pass until a new time, and output that in another column. </p>
  
  <p>I'm sure this isn't the best way to do it, but what I have so far is the following. I have given up on fiddling with dates, and am just working with the time:</p>
  
  <pre><code>Sub TimeModule()
  Dim DaysLeft, HoursLeft, MinutesLeft As Double
  DaysLeft = Val(InputBox("Days left"))
  HoursLeft = Val(InputBox("Hours left"))
  MinutesLeft = Val(InputBox("Minutes left"))
  
  Dim CurrentTime As Date
  CurrentTime = TimeValue(Now())
  
  ActiveCell.Value = CurrentTime
  ActiveCell.Offset(0, 1) = CurrentTime + Time(HoursLeft, MinutesLeft, 0)
  
  End Sub
  </code></pre>
  
  <p>I am getting an error, of course. If anyone could shed some light on a better way to do this, along with the functions I'm misusing, I would really appreciate it!</p>
  
  <p>Edit: I would, of course ultimately like for the script to handle days as well.</p>