[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VB.Net, Office, #$%^&@ Constants

Posted on 2004-04-20
3
Medium Priority
?
1,193 Views
Last Modified: 2012-06-22
Where do I get a listing of what the values are for Excel and Word constants that were perfectly legitimate (or at least some were) in VB 6 but seemed to have disappeared off the face of the planet for VB.NET

For example

   
    With objWS.Range("A1:M1")
        .HorizontalAlignment = xlLeft
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With

I need to find values for xlLeft, xlCenter, xlRight, xlBottom, xlContext, ad. nausum.

Thanks,
K
0
Comment
Question by:Knomaze
[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
3 Comments
 
LVL 9

Accepted Solution

by:
malharone earned 1000 total points
ID: 10872369
you've to explicitely refer to them using the Excel namespace.

eg.

worksheet.Range("A1:M1").VerticalAlignment = Excel.Constants.xlBottom
0
 
LVL 9

Expert Comment

by:malharone
ID: 10872406
if you can't find the enum/constant in Excel.Constants namespace,
the easiest way to locate them is go to Excel, Tools > Macros > VB Editor.
In the VBA, press F2 (or view > object browser) and enter the name of the constant and search for it. it'll list LIBRARY and CLASS columns. Use them as a namespace.
0
 

Author Comment

by:Knomaze
ID: 10872686
I was about to update the question that I FINALLY found the name space in the object browser with all the constants declared but then needed to know how I referenced it. This is exactly what I was looking for.

Thank-you,
K
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 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