Thread: Insert calender
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Insert calender

Bad example from me (not tested good)

Do you use two cells or do you use
column A and B with this code

Let me know and I change the code and test it this time <g

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Hi ArcticWolf

Try this

Private Sub Calendar1_Click()
If Range("A1").Value CDbl(Calendar1.Value) Then
MsgBox "Please select another date"
Else
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End If
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"ArcticWolf" wrote in message ...
Hi Ron,

Thanks for posting this - very useful. I've put it into my sheet and it
works perfect :)

I wonder if you could help modify it slightly for my needs please?

I have the calendar pop-up when a cell in column A (Date Order Received) is
selected.
In column B I need the user to put another date in (Date Order Shipped - and
I have used your calendar again) HOWEVER - this time (in B) I need some
'intelligence' so that the user cannot select a date which is less than the
date in A. B will always be = A. Is there a way to modify the code so
column B doesn't return an earlier date than A?

Thanks in advance,

AW

"Ron de Bruin" wrote:

Hi Tinee

Try
http://www.rondebruin.nl/calendar.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Tinee" wrote in message ...
How do I select dates without typing a look up list. Can a calender be
embedded into a worksheet in two cells. ie a list with to & from dates.