using VBA to format a value to [h]:ss

  • Thread starter Thread starter azidrane
  • Start date Start date
A

azidrane

Trying to get a value (held in a SINGLE variable) to be displayed in a
cell in a this format [h]:ss

But, when i do this
sngTime = 1 'for one day
range("A1").value = format(sngTime, "[h]:ss")

All i get is :12

Whats wrong?
 
with activesheet.range("a1") 'I like qualifying my ranges!
.numberformat = "[h]:ss"
.value = sngtime
end with


Trying to get a value (held in a SINGLE variable) to be displayed in a
cell in a this format [h]:ss

But, when i do this
sngTime = 1 'for one day
range("A1").value = format(sngTime, "[h]:ss")

All i get is :12

Whats wrong?
 
Back
Top