willhelm654
New Member
- Joined
- Jan 11, 2020
- Messages
- 7
- Office Version
- 2013
- Platform
- Windows
Hello I hope somebody can shed some light for me.
I have a macro button on my s/sheet that runs pretty well to highlight todays date within a row. However it also red borders the left and right side of the column below and im not sure why? It is quite useful and I would like to have the same funciton on my second sheet but it only extends two rows as seen below.
Code is:
Here is a screen shot to explain:
Second Sheet:
I have a macro button on my s/sheet that runs pretty well to highlight todays date within a row. However it also red borders the left and right side of the column below and im not sure why? It is quite useful and I would like to have the same funciton on my second sheet but it only extends two rows as seen below.
Code is:
VBA Code:
Sub Select_Today()
Dim C As Variant
With ActiveSheet
With .Range("C3:HK3")
C = Application.Match(CLng(Date), .Cells, 0)
If IsNumeric(C) Then
.Item(1, C).Select
Else
MsgBox "Date is not in column range C3:HK3."
End If
End With
End With
End Sub
Here is a screen shot to explain:
Second Sheet: