LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Text alignment in a cell from VBA

The range object doesn't have an alignment property, so it is highly doubtful
that the command that was actually executed is the command you show if in
fact the text in a cell was centered.

the alignment property and this constant belong to a wordart object. This
is in a totally different library than Excel.

--
Regards,
Tom Ogilvy


"brucemc" wrote:


This one has me confused.
Not expecting it to work, I threw the following line intoa module:


Code:
--------------------
.Range("F16").Alignment = msoTextEffectAlignmentCentered
--------------------


Surprisingly it worked, centering the text in the cell or block of
cells.

I did a number of modifications to the code today, but nothing that I
would think have any impact on that whatsoever, but now I am getting
the error statement I originally expected to the effect of "This object
does not support that property or method."

Other than voodoo, can anyone suggest what might be going on?


--
brucemc
------------------------------------------------------------------------
brucemc's Profile: http://www.excelforum.com/member.php...o&userid=32871
View this thread: http://www.excelforum.com/showthread...hreadid=558995


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
text alignment BillCT1984 Excel Discussion (Misc queries) 1 March 1st 10 04:28 PM
In Cell alignment, how do I update the default vertical alignment How to update default cell alignment Setting up and Configuration of Excel 2 February 4th 09 02:25 PM
Cell Text Alignment - Not A Centering Issue Minitman Excel Discussion (Misc queries) 4 July 14th 08 08:42 AM
Text Alignment Ben Excel Discussion (Misc queries) 3 August 20th 07 07:48 PM
Text alignment dkingfish Excel Discussion (Misc queries) 0 January 22nd 07 03:44 PM


All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"