View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default MS Calendar help requested: default to 1st of prior month

Calendar1.Value = DateSerial(Year(Date), Month(Date) - 1, 1)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"timh2ofall" wrote in message
...
Using Calendar in a 97 UserForm to enter dates into a textbox. I want
it to default to the 1st of the previous month on opening.
I tried using the month property set to 0 and then using PreviousMonth
as the Sub but suspect that it won't change after the next month comes
around.
Made a feeble attempt at trying Today -30 just to get to any date last
month.
Any suggestions?
Thanks!
Tim