Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Goto Worksheets("Sheet1").Range("A1"), True
thisworkbook.Save
End Sub
this has the obvious disadvantage of forcing the workbook to be saved.
(if you don't save the workbook after changing the selection, there isn't
much point in doing it I wouldn't think)
this assumes A1 of Sheet1 is not merged - adjust to suit your needs.
This code would go in the Thisworkbook module
http://www.cpearson.com/excel/events.htm for an overview of events if you
are not familiar.
--
Regards,
Tom Ogilvy
"copteral" <(E-Mail Removed)> wrote in message
news:85BB2519-E669-4183-8F30-(E-Mail Removed)...
>I am using the calendar code
> From Ron de Bruin's site:
> http://www.rondebruin.nl/calendar.htm
>
> Unfortunately, my form is a copy of a paper form and therefore has many
> merged cells. The calendar control continues to show unless an unmerged
> cell
> is selected after selecting the date. Is there a way to programmatically
> select a none merged cell to make the calendar invisible before closing?
>