PDA

View Full Version : Solved: VBA Calendar problem



cmm0812
04-17-2008, 06:54 AM
I am using a calendar form in my document. I have it set up to activate whenever cell "N" is selected.

The problem that I am having is that the calendar automatically pops up when an entire row containing a cell "N" is selected.

Is there a statement that I can put into my macro to tell it to not allow the calendar to pop up if a row is selected containing the cell "N" but only if a cell "N" is selected specifically?

Charlize
04-17-2008, 07:09 AM
I am using a calendar form in my document. I have it set up to activate whenever cell "N" is selected.

The problem that I am having is that the calendar automatically pops up when an entire row containing a cell "N" is selected.

Is there a statement that I can put into my macro to tell it to not allow the calendar to pop up if a row is selected containing the cell "N" but only if a cell "N" is selected specifically?Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count > 1 Then Exit Sub
If Target.Column = 14 Then
MsgBox "N"
End If
End SubCharlize

cmm0812
04-17-2008, 08:59 AM
Thanks, that works excellently!