M
Minitman
Greetings,
I have a set of merged cells in column A. These merged cells are 1
column wide and 27 rows high. They have dates as values, displayed at
a 90 degree angle with a large font. I need to access the value from
any one of the 27 rows that the merged cell is sitting in. I am
trying to use the Worksheet_BeforeDoubleClick event on the cells in
column C and offset the focus from the target to the merged cell in
column A to capture the date. I can't seem to get it to display the
date.
Here is my code:
_______________________________________________________
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
Dim myRng
If Target.Column = 3 Then
myRng = Target.Offset(0, -2)
MsgBox "Date = " & myRng
End If
End Sub
_______________________________________________________
If I change the column offset, it works as expected. It appears that
vba can't recognize the merged cell.
Anyone have any idea as to how to get the code to see the value in the
merged cell?
Any help would be appreciated.
-Minitman
I have a set of merged cells in column A. These merged cells are 1
column wide and 27 rows high. They have dates as values, displayed at
a 90 degree angle with a large font. I need to access the value from
any one of the 27 rows that the merged cell is sitting in. I am
trying to use the Worksheet_BeforeDoubleClick event on the cells in
column C and offset the focus from the target to the merged cell in
column A to capture the date. I can't seem to get it to display the
date.
Here is my code:
_______________________________________________________
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
Dim myRng
If Target.Column = 3 Then
myRng = Target.Offset(0, -2)
MsgBox "Date = " & myRng
End If
End Sub
_______________________________________________________
If I change the column offset, it works as expected. It appears that
vba can't recognize the merged cell.
Anyone have any idea as to how to get the code to see the value in the
merged cell?
Any help would be appreciated.
-Minitman