HMote


I need my datetime stamp to show both, but by default, I guess, when VBA compiles my data from SQL Server, only the date shows.  I change this and save the workbook, but the format gets over-written each time the data is placed into the sheet.  I hope that there is a way to change the data format for a given column via VBA after I compile by data from SQL Server...Any help on this issue would be appreciated.  Thanks!


Re: Setting the Data Format for a Column via VBA

HMote


Here's the line of code I used after compiling my data into the sheet to change the general format to show both date and time:

Sheet1.Range("E2", "E1000").NumberFormat = "m/d/yyyy hh:mm"