How to assign the Value of Yesterday's Date to a String Variable in Visual Basic For Applications

This question is related a little related to a previous question in which I had asked how to get yesterdays date typed into a word document in response to the click event of a button on a VBA form.
The answer was
Selection.TypeText Format(Now - 1, "dd MMMM YYYY")
and this did work.
I would now like to be able to assign the value of yesterday's date to a string variable and would appreciate help for that.

So that if I say
Dim YesterdayDate As String
YesterdayDate = ?
( I need help what should come in place of ? so that the String Variable YesterdayDate becomes equal to Monday, 10 November 2008 assuming that today's date is Tuesday, 11 November 2008))
Thank you for your help in anticipation.
LVL 1
FaheemAhmadGulAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnGerhardtCommented:
How about
Yesterday = Format(Now - 1, "dd MMMM YYYY")
0
leegclystvaleCommented:
Same concept as yestrerdaysdate = Date() -1
0
FaheemAhmadGulAuthor Commented:
Many thanks for the prompt response to my query. Both of the above solutions work. The one by JohnGerhardt shows date as 10 November 2008 and one by leegclystvale shows date as 10/11/2008.
Can any of the above solutions be modified a little so that the date also includes day of the week. So that the variable  YesterdaysDate becomes equal to Monday, 10 November 2008.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

leegclystvaleCommented:
yesterdaysdate = Format(Now()-1, "Long Date")
0
leegclystvaleCommented:
In fact ignore that, use yesterdaysdate = Format(now -1, "dddd, MMM d yyyy")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FaheemAhmadGulAuthor Commented:
Excellent! This worked perfectly. Many thanks. As this required some extra work and both of you contributed to the solution, I have increased the total points to 250 and split them 150+100. I hope this is OK.
Once again thanking you both. Regards Faheem
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.