View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default Create a "helpsheet"

Sure

Sub ShowBox()
Dim res As String
Dim D As Date
On Error GoTo TheEnd
res = Application.InputBox("enter your decimal time:")
If res = "" Then Exit Sub
D = CDbl(res) / 24
ActiveCell.Value = D
ActiveCell.NumberFormat = "hh:mm"
TheEnd:
End Sub

HTH. Best wishes Harald

"Jonsson " skrev i melding
...
Hi,

I´m sorry to say, but I get an error at "res" as a "undifined
variabel". I´m using swedish version.

Anyway, that solution could work, but is it possible to set the box to
automatically do the calc. from 100/60 to count time?

(e.g input in box 10,15 clocktime and the box return 10,25 in the
active cell)?


//Thomas


---
Message posted from http://www.ExcelForum.com/