![]() |
Calendar conrtol issue
How about:
Private Sub UserForm_Activate() CalendarControl.Value = Date End Sub or Private Sub UserForm_Initialize() CalendarControl.Value = Date End Sub RBS "Patrick Simonds" wrote in message ... I am using Calendar Control 10 on a UserForm, but can not figure out how to have the current date come up on the calendar when it opens. I have tried setting ValueIsNull to both False and True but I still get the last date that was selected by the user. |
Calendar conrtol issue
Just like any other control, the calendar control will have a name
Combobox1.Value = 3 Calendar1.Value = Date Change CalendarControl.Value = Date to reflect the name of the calendar control. -- Regards, Tom Ogilvy "Patrick Simonds" wrote in message ... This is my code now with the inclusion of CalendarControl.Value = Date But now instead of bringing up the EngravingForm I get the following error: Run Tim error '424' Object Required When I click on the debug button the EngravingForm.Show is highlighted. If I remove the CalendarControl.Value = Date everything works (except for my original problem of course) Private Sub UserForm_Initialize() With EngravingForm .DateTextBox2.Text = Format(Date, "dddd dd-mmm-yy") End With Set rng = Cells(ActiveCell.Row, 1) TextBox5.Text = rng(1, 1).Text CalendarControl.Value = Date End Sub "RB Smissaert" wrote in message ... How about: Private Sub UserForm_Activate() CalendarControl.Value = Date End Sub or Private Sub UserForm_Initialize() CalendarControl.Value = Date End Sub RBS "Patrick Simonds" wrote in message ... I am using Calendar Control 10 on a UserForm, but can not figure out how to have the current date come up on the calendar when it opens. I have tried setting ValueIsNull to both False and True but I still get the last date that was selected by the user. |
Calendar conrtol issue
Presumed (wrongly) that you would replace CalendarControl with the real name
of that control. I am sure you have fixed it by now. RBS "Patrick Simonds" wrote in message ... This is my code now with the inclusion of CalendarControl.Value = Date But now instead of bringing up the EngravingForm I get the following error: Run Tim error '424' Object Required When I click on the debug button the EngravingForm.Show is highlighted. If I remove the CalendarControl.Value = Date everything works (except for my original problem of course) Private Sub UserForm_Initialize() With EngravingForm .DateTextBox2.Text = Format(Date, "dddd dd-mmm-yy") End With Set rng = Cells(ActiveCell.Row, 1) TextBox5.Text = rng(1, 1).Text CalendarControl.Value = Date End Sub "RB Smissaert" wrote in message ... How about: Private Sub UserForm_Activate() CalendarControl.Value = Date End Sub or Private Sub UserForm_Initialize() CalendarControl.Value = Date End Sub RBS "Patrick Simonds" wrote in message ... I am using Calendar Control 10 on a UserForm, but can not figure out how to have the current date come up on the calendar when it opens. I have tried setting ValueIsNull to both False and True but I still get the last date that was selected by the user. |
All times are GMT +1. The time now is 03:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com