Thread: Pop-up calendar
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
BumblebeeFan BumblebeeFan is offline
external usenet poster
 
Posts: 7
Default Pop-up calendar

Hi Rick,

Sorry... but think I'm lost. Maybe it'll help if I show you the calendar?

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

Dim Rng1 As Range

'Assign the range to work with
Set Rng1 = Range("b12,g12")

'Only work on assigned range
If Intersect(Target, Rng1) Is Nothing Then Exit Sub

'Cancel cell editing that would normally trigger when you double click
Cancel = True

'Call the userform
UserForm1.Show

End Sub

I added the DTPicker just below - think I've completely misunderstood what
to do...

BBFan

"BSc Chem Eng Rick" wrote:

Hi BBFan

I'm not sure which Pop up calender you are using but below is a procedure
which uses the Microsoft DateTime Picker. When the start date is changed,
then the end date value tracks it. Be careful with this because if you change
the start date after you pick your end date, your end date will change.

Note the below procedure is inserted into the code for the userform NOT a
separate module. DTPicker1 is the start date and DTPicker2 is the end date.

Private Sub DTPicker1_Change()
DTPicker2.Value = DTPicker1.Value
End Sub

If this helps please click "Yes"