Setting date to end of month

  • Thread starter Thread starter Scott Viney
  • Start date Start date
S

Scott Viney

Afternoon All,

I have a textbox where the user selects a date for the 1st of the month from
a calendar control. And have coded it so that if its not the first it
changes it. Works good.

There is another text box beside this one for the end of month. Are there
and VBA functions that will give me the date for the end of month depending
on the first text box. If not how do I calculate the end of the month.

Cheers,
Scott V
 
Scott:

I found this posted by Rick Brandt over in Google:

ControlSource for end of the month textbox:

=DateSerial(Year(nameoftextboxthatholdsfirstdate),
Month(nameoftextboxthatholdsfirstdate)+1,0)

HTH

Debra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top