View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Sullentrup Bob Sullentrup is offline
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