Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I do I get the calendar to start on what the current date is? Here is the
code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the wrokbook open function you can put
Calendar1.Year = Year(Date) "Mekinnik" wrote: I do I get the calendar to start on what the current date is? Here is the code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried what you suggested and it didn't work it give a runtime error of 424,
object required. Is it maybe I need to put it somewhere else? The way I use the calendar is when the user enters data on a user form when they get to the date textbox they double click it and the calendar opens for them to select the date, however when it opens it always starts at October 2007?? "Joel" wrote: In the wrokbook open function you can put Calendar1.Year = Year(Date) "Mekinnik" wrote: I do I get the calendar to start on what the current date is? Here is the code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried th ecode on Excel 2003 before I posted it. I don't know all the
diference between versions of excel. "Mekinnik" wrote: I tried what you suggested and it didn't work it give a runtime error of 424, object required. Is it maybe I need to put it somewhere else? The way I use the calendar is when the user enters data on a user form when they get to the date textbox they double click it and the calendar opens for them to select the date, however when it opens it always starts at October 2007?? "Joel" wrote: In the wrokbook open function you can put Calendar1.Year = Year(Date) "Mekinnik" wrote: I do I get the calendar to start on what the current date is? Here is the code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using excel 2003, I'm not sure but maybe its the way I applied the
calendar. All I did was create a user form and then pasted a calendar to that user form with the calendar tool in VB. But for some odd reason it will not allow me to change anything for it or I just have not found a way to do it yet. I looked up calendar in the help section and tried what it suggested but it also did not work. What type of tool is the callendar? Is it an Active X control or just a VB one? "Joel" wrote: I tried th ecode on Excel 2003 before I posted it. I don't know all the diference between versions of excel. "Mekinnik" wrote: I tried what you suggested and it didn't work it give a runtime error of 424, object required. Is it maybe I need to put it somewhere else? The way I use the calendar is when the user enters data on a user form when they get to the date textbox they double click it and the calendar opens for them to select the date, however when it opens it always starts at October 2007?? "Joel" wrote: In the wrokbook open function you can put Calendar1.Year = Year(Date) "Mekinnik" wrote: I do I get the calendar to start on what the current date is? Here is the code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I added th ecalendar as an object on the worksheet using Insert - Object -
Calendar Control 11.0. You can also add an add-in that is a com object. "Mekinnik" wrote: I am using excel 2003, I'm not sure but maybe its the way I applied the calendar. All I did was create a user form and then pasted a calendar to that user form with the calendar tool in VB. But for some odd reason it will not allow me to change anything for it or I just have not found a way to do it yet. I looked up calendar in the help section and tried what it suggested but it also did not work. What type of tool is the callendar? Is it an Active X control or just a VB one? "Joel" wrote: I tried th ecode on Excel 2003 before I posted it. I don't know all the diference between versions of excel. "Mekinnik" wrote: I tried what you suggested and it didn't work it give a runtime error of 424, object required. Is it maybe I need to put it somewhere else? The way I use the calendar is when the user enters data on a user form when they get to the date textbox they double click it and the calendar opens for them to select the date, however when it opens it always starts at October 2007?? "Joel" wrote: In the wrokbook open function you can put Calendar1.Year = Year(Date) "Mekinnik" wrote: I do I get the calendar to start on what the current date is? Here is the code I use currently. Private Sub Calendar1_Click() FrmProduct.TxtDate.Value = Calendar1.Value Unload Me FrmProduct.BtnAdd.SetFocus End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calendar Question | Excel Discussion (Misc queries) | |||
monthview calendar question/ want the calendar to display weekdays only.. | Excel Programming | |||
calendar question | Excel Programming | |||
Calendar Question | Excel Discussion (Misc queries) | |||
Calendar question | Excel Programming |