Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Excel VBScript (not VBA) 1

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have this piece of code on my script:

.Range(.Cells(1,1),.cells(1,5)).HorizontalAlignment = xlCenter
.Range(.Cells(h,1),.cells(1,5)).Font.Underline = xlUnderlineStyleSingle
.Range(.Cells(1,1), .Cells(1,5)).Font.FontStyle = "Bold"
.Range(.Cells(1,1), .Cells(1,5)).Font.Size = 9

Everything works except the HorizontalAlignment and Underline.

Any help will be greatly appreciated.
 
[1] I suppose you've explicitly defined those constants?
[tt] xlCenter=-4108
xlUnderlineStyleSingle=2[/tt]
[2] There is a typo there.
> .Range(.Cells(h,1),.cells(1,5)).Font.Underline = xlUnderlineStyleSingle
[tt] .Range(.Cells([highlight]1[/highlight],1),.cells(1,5)).Font.Underline = xlUnderlineStyleSingle[/tt]
 
Thanks. It works. I have been struggling with this for quite awhile and was about to give up on it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top