Not sure whats going on here... but with the code below, if I type:
in the immediate window I get:
Then if I type:
I get:
Anyone have any idea whats going on?
Code in question:
Code:
?rngwhole.Address
Code:
$A$20:$M$20 '[[correct answer]]
Code:
?rngwhole.Range(.Cells(1, 1), .Cells(1, 2)).Address
Code:
$A$39:$B$39 '[[correct column, BUT +19 rows off!]]
Code in question:
Code:
Sub testy()
Dim rngWhole As Range
Set rngWhole = Range("A20:M20")
With rngWhole
With .Range(.Cells(1, 1), .Cells(1, 2))
.Select
.HorizontalAlignment = xlCenterAcrossSelection
.VerticalAlignment = xlBottom
.WrapText = True
End With
With .Cells(1, 3)
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = True
End With
With .Range(.Cells(1, 10), .Cells(1, 12))
.Select
.HorizontalAlignment = xlCenterAcrossSelection
.VerticalAlignment = xlBottom
.WrapText = True
End With
End With
End Sub