jammer6_9
07-31-2013, 06:22 AM
What i am trying to achieve here is assign a give range as my target range. Upon hitting the enter key or moving out from the current active cell which is in the target range, i want to move on the cell on the left and saved the value of the calendar. After the calendar it should go to the next row of my target range. :(
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rMyRg As Range
On Error Resume Next
Set rMyRg = Range("b1:b15") 'I want also to add range (d1:d15), (f1:f15), "(l1:l15)
Set rMyRg = Application.Intersect(rMyRg, Target)
If Not rMyRg Is Nothing Then
If ActiveCell.Address Then
ActiveCell.Offset(0, -1).Select
If frmCalendar.Visible = False Then
frmCalendar.Show
End If
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rMyRg As Range
On Error Resume Next
Set rMyRg = Range("b1:b15") 'I want also to add range (d1:d15), (f1:f15), "(l1:l15)
Set rMyRg = Application.Intersect(rMyRg, Target)
If Not rMyRg Is Nothing Then
If ActiveCell.Address Then
ActiveCell.Offset(0, -1).Select
If frmCalendar.Visible = False Then
frmCalendar.Show
End If
End If
End If
End Sub