Solved

VB.net Excel Add-in 'xlEdgeTop' is not declared.

Posted on 2014-03-12
2
663 Views
Last Modified: 2014-03-12
Hi

In my VB.net Excel Add-in I am trying to work with cell borders. In the code below I get the error 'xlEdgeTop' is not declared. How do I correct this?

   C = Globals.ThisAddIn.Application.Selection.Borders(xlEdgeTop).ColorIndex
0
Comment
Question by:murbro
2 Comments
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
ID: 39924617
Looks like xlEdgeTop is being treated as an undeclared variable in your add-in.

Try fully qualifying it, something like this perhaps.
xlApp.XlBordersIndex.xlEdgeTop

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 39924633
thanks very much
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now