I need to convert a date into a lowercase string for a vba variable.
Password2 = Password1 & (LOWER(Text(strDateWork, "mmmm")))
Where am I going wrong? TIA
Convert date to lowercase month
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.
Convert date to lowercase month
Nathan
There's no place like home.....
There's no place like home.....
-
- Administrator
- Posts: 78596
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Convert date to lowercase month
LOWER and TEXT are worksheet functions, not VBA functions.
The VBA equivalent of LOWER is LCase.
The VBA equivalent of TEXT is Format.
So try
LCase(Format(strDateWork, "mmmm"))
By the way, shouldn't you use a date variable for the date instead of a string variable? The prefix "str" of the name strDateWork suggests that it is a string variable.
The VBA equivalent of LOWER is LCase.
The VBA equivalent of TEXT is Format.
So try
LCase(Format(strDateWork, "mmmm"))
By the way, shouldn't you use a date variable for the date instead of a string variable? The prefix "str" of the name strDateWork suggests that it is a string variable.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1185
- Joined: 24 Jan 2010, 12:02
- Location: Wales, UK.
Re: Convert date to lowercase month
Thanks Hans.
Good point, I keep adopting bad habits.
Good point, I keep adopting bad habits.
Nathan
There's no place like home.....
There's no place like home.....