Hi,
After several attempts but fails to rectify the error in the following codes where the selected cell is double-clicked, the cursor fails to move to the colored ( yellow) row in the next columns and no message prompts : -
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
Dim icol As Integer
Select Case Target.Column
Case 2 ' column B
For icol = 2 To Cells(Target.Row, Columns.Count).End(xlToLeft).Column
If Cells(Target.Row, icol).Interior.ColorIndex = 6 Then
Cells(Target.Row, icol).Select
MsgBox Application.WorksheetFunction.Text(Cells(1, icol), "dd-mmmm-yyyy") _
& " " & Application.WorksheetFunction.Text(Cells(1, icol), "dddd") _
& " " & Cells(Target.Row, icol) & " day", vbOKOnly
End If
Next icol
Cells(Target.Row, Target.Column).Offset(0, 1).Select
End Select
End Sub
Any helps will be appreciated on the above problem and thanks in advance
Regards
Len
After several attempts but fails to rectify the error in the following codes where the selected cell is double-clicked, the cursor fails to move to the colored ( yellow) row in the next columns and no message prompts : -
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
Dim icol As Integer
Select Case Target.Column
Case 2 ' column B
For icol = 2 To Cells(Target.Row, Columns.Count).End(xlToLeft).Column
If Cells(Target.Row, icol).Interior.ColorIndex = 6 Then
Cells(Target.Row, icol).Select
MsgBox Application.WorksheetFunction.Text(Cells(1, icol), "dd-mmmm-yyyy") _
& " " & Application.WorksheetFunction.Text(Cells(1, icol), "dddd") _
& " " & Cells(Target.Row, icol) & " day", vbOKOnly
End If
Next icol
Cells(Target.Row, Target.Column).Offset(0, 1).Select
End Select
End Sub
Any helps will be appreciated on the above problem and thanks in advance
Regards
Len