Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Calendar question?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Calendar question?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Calendar question?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Calendar question?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Calendar question?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Calendar question?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Question Stan Excel Discussion (Misc queries) 1 October 8th 09 05:33 PM
monthview calendar question/ want the calendar to display weekdays only.. [email protected] Excel Programming 0 August 26th 07 09:25 PM
calendar question Oldjay Excel Programming 3 October 29th 06 05:15 PM
Calendar Question D Excel Discussion (Misc queries) 12 December 19th 05 05:06 PM
Calendar question Patrick Simonds Excel Programming 1 December 11th 03 04:38 AM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"