ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Formatting (https://www.excelbanter.com/excel-programming/407301-date-formatting.html)

bodhisatvaofboogie

Date Formatting
 
I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!




Gary''s Student

Date Formatting
 
Dim s As String
s = Application.WorksheetFunction.Text(Now, "mmmm")

--
Gary''s Student - gsnu200772


"bodhisatvaofboogie" wrote:

I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!




Ron Rosenfeld

Date Formatting
 
On Fri, 7 Mar 2008 06:54:04 -0800, bodhisatvaofboogie
wrote:

I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!



strbody = "text " & Format(Now(), "mmmm") & " text"

--ron

Rick Rothstein \(MVP - VB\)[_1393_]

Date Formatting
 
Try this...

strbody = "text " & MonthName(Month(Now)) & " text"

Rick


"bodhisatvaofboogie" wrote in
message ...
I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!





bodhisatvaofboogie

Date Formatting
 
THanks for all the speedy results...NOW one step further can I make the date
Bold? and How do I do that?

strbody = "text " & MonthName(Month(Now)) & " text"


THANKS AGAIN!!!
"Rick Rothstein (MVP - VB)" wrote:

Try this...

strbody = "text " & MonthName(Month(Now)) & " text"

Rick


"bodhisatvaofboogie" wrote in
message ...
I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!






Rick Rothstein \(MVP - VB\)[_1397_]

Date Formatting
 
If you are storing the value in a String variable (as your initial posting
showed), then no. Text has no attributes (such as Bold or Size), it only has
characters 'strung' one after the other. Things that display text *may* be
able to bold it, but it depends on what that display mechanism is (TextBox,
Excel cells, etc); also some file formats (Word, Rich Text Format, etc.)
allow text attributes to be stored along with the text, but those are files
that require specialized display mechanisms to read and show them.

Rick


"bodhisatvaofboogie" wrote in
message ...
THanks for all the speedy results...NOW one step further can I make the
date
Bold? and How do I do that?

strbody = "text " & MonthName(Month(Now)) & " text"


THANKS AGAIN!!!
"Rick Rothstein (MVP - VB)" wrote:

Try this...

strbody = "text " & MonthName(Month(Now)) & " text"

Rick


"bodhisatvaofboogie" wrote
in
message ...
I want to make this the Alpha Month instead of Numeric. For example

CStr(Month(Now)

This will give a result of the number 3

This is being used in the following way:

strbody = "text " & CStr(Month(Now) & " text"

Any help is appreciated. Thanks!!!








All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com