Hi all,
I have the following code
Range(Output).Offset(0,1).Value = "to"
Range(Output).Offset(0,1).HorizontalOffset = xlCenter.
There is a bunch of code after this. Everything works fine until it gets to the HorizontalOffset statement. Then the sub stops running with no error. The text does not get centered.
This doesn't work either:
Range("B1").Value = "to"
Range("B1").HorizontalOffset = xlCenter.
Also tried it in a With
With Range(Output).Offset(0,1)
.Value = "to"
.HorizontalAlignment = xlCenter
End With
Yet, if I go to the immediate window and type Range("B1").HorizontalAlignment = xlCenter
Then the text gets centered.
Andy ideas what is going on?
I have the following code
Range(Output).Offset(0,1).Value = "to"
Range(Output).Offset(0,1).HorizontalOffset = xlCenter.
There is a bunch of code after this. Everything works fine until it gets to the HorizontalOffset statement. Then the sub stops running with no error. The text does not get centered.
This doesn't work either:
Range("B1").Value = "to"
Range("B1").HorizontalOffset = xlCenter.
Also tried it in a With
With Range(Output).Offset(0,1)
.Value = "to"
.HorizontalAlignment = xlCenter
End With
Yet, if I go to the immediate window and type Range("B1").HorizontalAlignment = xlCenter
Then the text gets centered.
Andy ideas what is going on?