Thanks
Craig
"Ron Rosenfeld" <(E-Mail Removed)> wrote in message
news

(E-Mail Removed)...
> On Fri, 17 Aug 2007 16:15:33 -0500, "C Brandt" <(E-Mail Removed)>
wrote:
>
> >Ron:
> >
> >Thanks for the speedy reply. Unfortunately it chokes with TEXT
highlighted
> >and gives me a popup with "Compile Error, SUB or Function not defined.
> >(Code Follows)
> >
> >Any clues?
> >
> >Thanks,
> >Craig
>
> The formula I gave you is for a worksheet cell.
>
> In VBA, in place of the TEXT function, you can use the FORMAT function.
>
>
> Sub foo()
> Const DN As Date = #7/23/2006#
> Debug.Print "Acct " & Format(DN, "yyyy-mm-dd") & ".txt"
> End Sub
>
> --> Acct 2006-07-23.txt
> --ron