#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default pop calendar

I have used the pop calendar as suggested from ronebruin.nl using the scpipt
from www.fontstuff.com
Is it possible when using it for the calendar to default to "todays"date
Stuart
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default pop calendar

Stuart

Right-click on the Calendar Form and make sure you have this code under
"View Code"

Option Explicit

' ================================================== =
' Code by Martin Green eMail
' Visit my Office Tips web site at
www.fontstuff.com
' ================================================== =

Private Sub cmdClose_Click()
' Close the UserForm
Unload Me
End Sub

Private Sub UserForm_Initialize()
' Check if active cell contains a date. If 'yes' show
' same date on calendar. If 'no' show today's date.
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Format(Date, "dd-mmm-yy")
End If
End Sub

Private Sub Calendar1_Click()
' Transfer date selected on calendar to active cell
' and close UserForm.
ActiveCell.Value = Format(Calendar1.Value, "dd-mmm-yy")
Unload Me
End Sub


Gord Dibben MS Excel MVP

On Fri, 17 Oct 2008 01:59:01 -0700, Stuart WJG
wrote:

I have used the pop calendar as suggested from ronebruin.nl using the scpipt
from www.fontstuff.com
Is it possible when using it for the calendar to default to "todays"date
Stuart


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default pop calendar

Gord
I have checked the code.It was slightly different. I have amended it to
match your. However every time i try and insert a date from the pop up
calendar it defaults to the 14th October when todays date is 20th
Stuart

"Gord Dibben" wrote:

Stuart

Right-click on the Calendar Form and make sure you have this code under
"View Code"

Option Explicit

' ================================================== =
' Code by Martin Green eMail
' Visit my Office Tips web site at
www.fontstuff.com
' ================================================== =

Private Sub cmdClose_Click()
' Close the UserForm
Unload Me
End Sub

Private Sub UserForm_Initialize()
' Check if active cell contains a date. If 'yes' show
' same date on calendar. If 'no' show today's date.
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Format(Date, "dd-mmm-yy")
End If
End Sub

Private Sub Calendar1_Click()
' Transfer date selected on calendar to active cell
' and close UserForm.
ActiveCell.Value = Format(Calendar1.Value, "dd-mmm-yy")
Unload Me
End Sub


Gord Dibben MS Excel MVP

On Fri, 17 Oct 2008 01:59:01 -0700, Stuart WJG
wrote:

I have used the pop calendar as suggested from ronebruin.nl using the scpipt
from www.fontstuff.com
Is it possible when using it for the calendar to default to "todays"date
Stuart



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default pop calendar

I cannot replicate your problem.

Private Sub UserForm_Initialize()

should give you current date if no date is in the cell.


Gord

On Mon, 20 Oct 2008 01:30:08 -0700, Stuart WJG
wrote:

Gord
I have checked the code.It was slightly different. I have amended it to
match your. However every time i try and insert a date from the pop up
calendar it defaults to the 14th October when todays date is 20th
Stuart

"Gord Dibben" wrote:

Stuart

Right-click on the Calendar Form and make sure you have this code under
"View Code"

Option Explicit

' ================================================== =
' Code by Martin Green eMail
' Visit my Office Tips web site at
www.fontstuff.com
' ================================================== =

Private Sub cmdClose_Click()
' Close the UserForm
Unload Me
End Sub

Private Sub UserForm_Initialize()
' Check if active cell contains a date. If 'yes' show
' same date on calendar. If 'no' show today's date.
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Format(Date, "dd-mmm-yy")
End If
End Sub

Private Sub Calendar1_Click()
' Transfer date selected on calendar to active cell
' and close UserForm.
ActiveCell.Value = Format(Calendar1.Value, "dd-mmm-yy")
Unload Me
End Sub


Gord Dibben MS Excel MVP

On Fri, 17 Oct 2008 01:59:01 -0700, Stuart WJG
wrote:

I have used the pop calendar as suggested from ronebruin.nl using the scpipt
from www.fontstuff.com
Is it possible when using it for the calendar to default to "todays"date
Stuart




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 List to Calendar format Kristin Excel Worksheet Functions 3 August 29th 08 12:20 AM
find free sharware to include calendar pop or use calendar in cell ednc Excel Discussion (Misc queries) 2 April 14th 08 05:05 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
excel calendar - list of names displayed on calendar Brian'88 Excel Worksheet Functions 3 November 17th 06 10:31 PM
import calendar items from excel into outlook calendar jsewaiseh Excel Discussion (Misc queries) 0 September 2nd 05 03:53 PM


All times are GMT +1. The time now is 04:33 PM.

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

About Us

"It's about Microsoft Excel"