Border question

  • Thread starter Thread starter kramer.newsreader
  • Start date Start date
K

kramer.newsreader

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top