If you are working in Excel, it is pretty hard to not work with worksheets
and ranges, unless you are doing charts. <g> That said, here is some
different syntax that you might be more comfortable with.
ActiveWorkbook.ActiveCell.HorizontalAlignment = xlCenter
ActiveWorkbook.Selection.WrapText = True
"Nils Titley" wrote:
> I appreciate your suggestion but I am not working with Worksheets or Ranges.
> Workbooks and ActiveCell.
>
> Isn't there another way to do what I need to do?
>
> Thanks
>
>
> "JLGWhiz" wrote:
>
> > Worksheets("Sheet1").Range("B2").Value = _
> > "This text should wrap in a cell."
> > Worksheets("Sheet1").Range("B2").WrapText = True
> >
> > Worksheets("Sheet1").Range("B2").HorizontalAlignment = xlCenter
> >
> > "Nils Titley" wrote:
> >
> > > For my headers on a report I am creating, I need to be able to center
> > > justification and wrap the text. How do I do that in association with this
> > > code or before the code.
> > >
> > > ActiveCell.Offset(0, 0).Value = "Date"
> > >
> > > Thanks
|