Thread: Border question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Border question

WdLineStyleSingle sure looks like a constant from MSWord.

I think you want one of these:

XlLineStyle can be one of these XlLineStyle constants.
xlContinuous
xlDash
xlDashDot
xlDashDotDot
xlDot
xlDouble
xlSlantDashDot
xlLineStyleNone



wrote:

Thanks for all the help so far guys. One more question.

Here's a snippet of code from my current project:

With Worksheet
.Range("A1:C2").Borders.LineStyle = WdLineStyleSingle
End With

I always compile with:

Option Explicit

So when I try to run this subject, I get the error:

Compile error:
Variable not defined

Isn't WdLineStyleSingle built in? Do I need to Dim it?

Is WdLineStyleSingle just some constant where I can substitute the
actual value (just use 2 or whatever the value is) instead?

Thanks again for the great help.


--

Dave Peterson