|
-
May 17th, 2001, 02:45 AM
#1
Align in excel
Can anybody help me with the alignment in excel (i create an excel file from VB 6.0)
newbook.worksheets(1).range("A1:Z6").Align ????
Thanx
-
May 17th, 2001, 07:01 AM
#2
Re: Align in excel
You can use the horizontalalignment and the verticalalignment properties of the range.
newbook.worksheets(1).range("A1:Z6").HorizontalAlignment = xlCenter
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
May 17th, 2001, 07:06 AM
#3
Re: Align in excel
Dim xlSheet as Excel.Worksheet
xlApp.Visible = true
set xlWorkbook = xlApp.Workbooks.Add
set xlSheet = xlWorkbook.Sheets(1)
With xlSheet.Cells(1, 1)
.Value = "Hello"
.HorizontalAlignment = xlCenter ' Center
.HorizontalAlignment = xlRight ' Right Align
.HorizontalAlignment = xlLeft ' Left Align
.VerticalAlignment = xlBottom ' Bottom
.VerticalAlignment = xlCenter ' Center
.VerticalAlignment = xlTop ' Top
End With
xlWorkbook.Close false
xlApp.Quit
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|