Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Format Entire Column As Date With VBA

Status
Not open for further replies.

Jables

Programmer
Aug 28, 2001
148
US
I need to know in VBA how to select an entire Excel column and change its format to "Date". I haven't done much Excel VBA coding, but it seems like this should be trivial.

Help is very appreciated.
 
You're right, it's trivial. But you need to learn how to use the Macro recorder:
[blue]
Code:
Option Explicit

Sub Macro1()
[green]
Code:
'
' Macro1 Macro
' Macro recorded 7/17/03 by Zathras
'

'
[/color]
Code:
    Columns("D:D").Select
    Selection.NumberFormat = "m/d/yy"
End Sub
[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top