Is there a way to include a non-breaking space between the month and day in
the following date format code so that the month and day do not separate when
they appear at the end of a line?

ScheduleDate1 = Format(ScheduleDate, "mmmm dd, yyyy")

Thanks...
--
singeredel (Julie)

Re: Date Format Question by Helmut

Helmut
Sun May 28 12:04:07 CDT 2006

Hi Singeredel,

looks odd, but seems to work:

Selection.TypeText _
Text:=Format(Now, "mmmm" & Chr(160) & "dd," & Chr(160) & "yyyy")

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


Re: Date Format Question by Greg

Greg
Sun May 28 12:04:05 CDT 2006

Include the non-breaking character in your format definition:

Sub Test()
Dim SDate As Date
SDate = Now
Selection.Range.InsertAfter _
Format(SDate, "mmmm" & Chr(160) & "dd," & Chr(160) & "yyyy")
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


singeredel wrote:
> Is there a way to include a non-breaking space between the month and
> day in the following date format code so that the month and day do
> not separate when they appear at the end of a line?
>
> ScheduleDate1 = Format(ScheduleDate, "mmmm dd, yyyy")
>
> Thanks...



RE: Date Format Question by singeredel

singeredel
Mon May 29 15:19:02 CDT 2006

Thank you both. I didn't realize I could break up the format with the
character code. That works.
--
singeredel (Julie)


"singeredel" wrote:

> Is there a way to include a non-breaking space between the month and day in
> the following date format code so that the month and day do not separate when
> they appear at the end of a line?
>
> ScheduleDate1 = Format(ScheduleDate, "mmmm dd, yyyy")
>
> Thanks...
> --
> singeredel (Julie)