View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arnold Klapheck Arnold Klapheck is offline
external usenet poster
 
Posts: 42
Default With statement parameters

I am getting an error message of, "wrong number of arguments or invalid
property assignment" and .Borders is highlighted. see between *@. I was
hoping to avoid having a separate with statement for every xlEdgeLeft,
xlEdgeTop etc. Can someone let me know if it can be done this way and what
I need to do to make it work? thanx

With Range("A1:AQ1")
.NumberFormat = "General"
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
With *@.Borders*@(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight,
xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Font
.Name = "Arial"
.Size = 8
.Bold = False
.ColorIndex = xlAutomatic
End With
With .Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End With