Solved

VB.net Excel Add-in    .ReadingOrder = xlContext

Posted on 2013-01-05
2
2,257 Views
Last Modified: 2013-01-06
Hi. I am trying to convert the following VBA code to use in my VB.net Excel Add-in
but am not sure how to convert    .ReadingOrder = xlContext
My initial attempt is s hown further down

 With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With

        With Globals.ThisAddIn.Application.Selection
                            .HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
                            .VerticalAlignment = Excel.XlVAlign.xlVAlignBottom
                            .WrapText = False
                            .Orientation = 0
                            .AddIndent = False
                            .IndentLevel = 0
                            .ShrinkToFit = False
                            .ReadingOrder = Excel.XlOrder.xlDownThenOver
                            .MergeCells = False
            End With
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
andrewssd3 earned 500 total points
ID: 38748214
xlContext is part of the Constants class - try Excel.Constants.xlContext. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.constants(v=office.14).aspx
0
 

Author Closing Comment

by:Murray Brown
ID: 38748270
Thanks very much
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question