![]() |
|
#1
|
|||
|
|||
|
I've created a macro to launch the mini date picker when I click on cell A1.
It works. When I change the range to ("A1:A10") it doesn't work at all. how can I launch the date picker when I click in any cell in a range? Quote:
|
|
#2
|
||||
|
||||
|
This works for me:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
With ActiveSheet
If Intersect(Target, .Range("A1:A10")) Is Nothing Then .Shapes("Calendar").Visible = False: Exit Sub
If Selection.Cells.Count > 1 Then .Shapes("Calendar").Visible = False: Exit Sub
.Shapes("Calendar").Visible = True
.Shapes("Calendar").Left = ActiveCell.Left + ActiveCell.Width
.Shapes("Calendar").Top = ActiveCell.Top + ActiveCell.Height
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Excel VLOOKUP - Return cells that are not blank from range of specified cells | djlw84 | Excel | 10 | 05-09-2022 11:59 AM |
| Distribute text in one cell across a range of cells (overcoming selection.range.cells.count bug) | slaycock | Word VBA | 0 | 02-18-2017 07:00 AM |
| Copying text range of cells to different cells adds an extra line | jpb103 | Word VBA | 2 | 07-23-2014 12:22 PM |
Using range object to work with multiple columns
|
kjworduser | Word VBA | 1 | 11-01-2013 03:03 AM |
| Count range cells eliminating merge cells | danbenedek | Excel | 0 | 06-15-2010 12:40 AM |