 |
iliekater Level: Master
 Registered: 04-02-2005 Posts: 148
|
Aligning text in cells
I wonder if there is any way to align the text inside a cell . Lets say we have inserted data in the cells from A1 down to cell E4. How can one align the text inside those cells using VBA ?
|
|
|
03-09-2006 at 04:30 PM |
|
|
iliekater Level: Master
 Registered: 04-02-2005 Posts: 148
|
Re: Aligning text in cells
Oh , sorry , my mistake . I meant how can one do that by using VB 6 (not VBA) ?
|
|
19-09-2006 at 08:23 PM |
|
|
iliekater Level: Master
 Registered: 04-02-2005 Posts: 148
|
Re: Aligning text in cells
There's something wrong . I am using :
ExcelWorksheet.Range("A1:X9").Format.Align = 2
but I get the message :
"Object does not support this method or property ."
So , I went over and found that you can not use :
ExcelWorksheet.Range("A1:A9").Format ,
becouse the the Format property is not reckognized .
|
|
20-09-2006 at 07:18 PM |
|
|
iliekater Level: Master
 Registered: 04-02-2005 Posts: 148
|
Re: Aligning text in cells
Now , this is a correct code . This one really worked . I guess the first time you were using VB Net instead of VB6 . And , by the way , in order to align text to the center , I used :
ExcelWorksheet.Range("A1:X9").HorizontalAlignment = xlCenter
Thanks stickleprojects .
|
|
24-09-2006 at 04:26 PM |
|
|
jasonrle0332 Level: Protégé
 Registered: 23-08-2010 Posts: 6
|
Re: Aligning text in cells
To aligning text you can try to some vb.net word component ,Guess it may inspire you a little bit
____________________________
jason rle
|
|
23-08-2010 at 05:04 AM |
|
|
|
|
 |
 |