Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Date picker

$
0
0

On my spread sheet I have a cell "B7" when clicked the calendar pops up and user selects a date when the user selects another cell the calendar disappears, That's all good. Problem is after the worksheet is closed and reopened and "B7" is selected again the calendar pops up but you cannot select a date, Although I have noticed that if I go into design mode and resize the Calendar control just a little bit then go out of design mode it works just fine. "It is saved as .xlsm I have been into the trust center and did all that stuff and just don't know what else to do. My code for the worksheet is listed below.

Private Sub Calendar1_Click()
ActiveCell.Value = Calendar1.Value
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Address = "$B$7" Then
        Calendar1.Visible = True
    Else
        Calendar1.Visible = False
    If ActiveCell.Address = "$J$7" Then
        Calendar1.Visible = True
    Else
        Calendar1.Visible = False
    If ActiveCell.Address = "$J$6" Then
        Calendar1.Visible = True
    Else
        Calendar1.Visible = False
        
    End If
    End If
    End If
    
End Sub


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>