Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
With statement parameters
v = Array(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight, xlInsideVertical) for i = lbound(v) to ubound(v) With .Borders(v(i)) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Next With .Font .Name = "Arial" .Size = 8 .Bold = False .ColorIndex = xlAutomatic End With With .Interior .ColorIndex = 15 .Pattern = xlSolid End With End With -- Regards, Tom Ogilvy "Arnold Klapheck" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
With statement parameters
Thanks, that worked, I just needed to:
Dim v As Variant Dim i As Integer I have option explicit on. if these are the wrong type let me know otherwise response is not necessary, again thanx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
SQL & Like Parameters | Excel Discussion (Misc queries) | |||
IF Statement with 3 parameters | Excel Worksheet Functions | |||
too few parameters | Excel Discussion (Misc queries) | |||
IF Statement W/3 Parameters ? | Excel Worksheet Functions |