ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   date time Formating (https://www.excelbanter.com/excel-programming/361965-date-time-formating.html)

srroduin

date time Formating
 
How do I customize the cells so that if a person puts the mm/dd/yy hh into an
inputbox within my vba code it shows up in the cell as mm/dd/yy hh:00?

The people using this code are lazy and don't want to type :00 after each
hour.

Everytime I try to use the custom feature it tells me it won't work and to
use one of the built in formats. hmmm.

Anyone know of a way to do this??? Thanks :)



Crowbar via OfficeKB.com

date time Formating
 
On the line where you transmit the the data from the inputbox to cell you
need to use the & function to add the :00 to the end e.g.

sheet1.range("A1").value = inputbox & ":00"

Close enough?



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com