Setting cell borders

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I need to dymnamically set cell borders depending on how
many columns of data are entered by the user. Toward that
end I am trying to use the following:

worksheets(1).range(cells(3,2),cells
(52,curcol).borderaround _
colorindex:=xlautomatic, weight:=xlthick

When this compiles I get an error indicating that an ")"
or list seperator is expected. This is (except for the
range statement in the command) is almost exactly what is
in Help!

What is wrong?

Thanks in advance!

Kevin
 
worksheets(1).range(cells(3,2),cells(52,curcol)).borderaround _
colorindex:=xlautomatic, weight:=xlthick

You need to match the paren in the range
 
try this:
Worksheets(1).Range(Cells(3, 2), Cells(52,
curcol)).BorderAround _
ColorIndex:=xlAutomatic, Weight:=xlThick
 

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