LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default VSTO Cell Alignment Enumeration

I am right-aligning text in a cell using VSTO with this statement:

((Excel.Range)rngBackGround.Cells[7,4]).HorizontalAlignment = -4152;

In VBA, it's xlRight, not -4152.

I have discovered left justification is 1, centered is -4108;

What do I need to include and reference to be able to say something like:

System.Constants.Alignment.xlRight, rather than -4152?

--
Bob Sullentrup
 
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
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
enumeration members adewole Excel Worksheet Functions 1 June 14th 07 06:38 PM
VSTO and Excel--End Cell Edit Mode? Jim Tilson Excel Programming 15 September 29th 05 08:40 PM
Finding the last nonblank cell in a column in VBA or VSTO Bob Sullentrup Excel Programming 1 September 9th 05 05:18 AM
Enumeration stck2mlon[_3_] Excel Programming 6 June 2nd 04 02:54 PM


All times are GMT +1. The time now is 02:17 AM.

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"