Hmmm. I think you are pointing me in the right direction, but I
couldn't quite get your suggestion to work in my code.
I am iterating over the cells in a selection, so my original code looks
like
saveFmt = Selection.Cells(RowCount, ColumnCount).NumberFormat
Selection.Cells(RowCount, ColumnCount).NumberFormat = "yyyymmdd"
Print #FileNum, Selection.Cells(RowCount, _
ColumnCount).Text;
Selection.Cells(RowCount, ColumnCount).NumberFormat = saveFmt
This works but seems goofy. I wanted to find a way to do it that never
changes the original date data.
Thanks again for any help.
Donna
Maybe something like:
Print #FileNum, format(Selection.Cells(RowCount, ColumnCount).value, _
"yyyymmdd")
And Dave Hawley was suggesting something along these lines (I think):
If IsDate(Selection.Cells(RowCount, ColumnCount).Value) Then
Print #FileNum, Format(Selection.Cells(RowCount, ColumnCount).Value, _
"yyyymmdd")
Else
Print #FileNum, Selection.Cells(RowCount, ColumnCount).Text
End If
> Hmmm. I think you are pointing me in the right direction, but I
> couldn't quite get your suggestion to work in my code.
[quoted text clipped - 18 lines]
> Excel Templates, Training, Add-ins & Business Software Galore!
> Free Excel Forum http://www.ozgrid.com/forum ***

Signature
Dave Peterson
ec35720@msn.com