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

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
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
NorieConnect With a Mentor VBA ExpertCommented:
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
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0
All Courses

From novice to tech pro — start learning today.