JG4life
03-31-2006, 10:40 AM
I recently had a post asking for help with a bit of code and had such success I figured I would try one more time.
I have created a the following sub routine
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'On Error GoTo Finished
If Target.Row >= 8 And Target.Row <= 32 Then
If Target.Address = ("$B$" & Target.Row) Then
frmCalendar.Show
End If
Else
End If
Finished:
End Sub
This code is activated everytime a user selects a cell in the B column and brings up the calendar. However, there are other sub routines that also affect cells in column b and when they are run, it also runs the above subroutine. Is there a way I can code it in that when the other subroutines are run, it ignores the one above? I only want the above subroutine to run when I "click" in the cell, not when the focus is brought to a cell with another subroutine.
I am thinking since there is a way to supress warning screens while executing code, there is a way to supress subroutines from running while another is being executed.
Sean
I have created a the following sub routine
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'On Error GoTo Finished
If Target.Row >= 8 And Target.Row <= 32 Then
If Target.Address = ("$B$" & Target.Row) Then
frmCalendar.Show
End If
Else
End If
Finished:
End Sub
This code is activated everytime a user selects a cell in the B column and brings up the calendar. However, there are other sub routines that also affect cells in column b and when they are run, it also runs the above subroutine. Is there a way I can code it in that when the other subroutines are run, it ignores the one above? I only want the above subroutine to run when I "click" in the cell, not when the focus is brought to a cell with another subroutine.
I am thinking since there is a way to supress warning screens while executing code, there is a way to supress subroutines from running while another is being executed.
Sean