Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
nesting with statements
I was trying to do the following (to get away from the select) but am getting
a "variable not defined" and it is highlighting xlInsideVerticle, or (if I take out xlInsideVerticle) error msg " wrong # of variables or invalid property assignment" and .Borders is highlighted, any suggestions would be appreciated, thanks With Range("A1:AQ1") .NumberFormat = "General" .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom With .Borders(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight, xlInsideVerticle) .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 ' the outside overall with statement ******** Original code below ************* Range("A1:AQ1").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection .NumberFormat = "General" .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With With Selection.Font .Name = "Arial" .Size = 8 .Bold = False .ColorIndex = xlAutomatic End With With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
nesting with statements
"Verticle" is spelled "Vertical". HTH Otto
"Arnold Klapheck" wrote in message ... I was trying to do the following (to get away from the select) but am getting a "variable not defined" and it is highlighting xlInsideVerticle, or (if I take out xlInsideVerticle) error msg " wrong # of variables or invalid property assignment" and .Borders is highlighted, any suggestions would be appreciated, thanks With Range("A1:AQ1") .NumberFormat = "General" .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom With .Borders(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight, xlInsideVerticle) .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 ' the outside overall with statement ******** Original code below ************* Range("A1:AQ1").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection .NumberFormat = "General" .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With With Selection.Font .Name = "Arial" .Size = 8 .Bold = False .ColorIndex = xlAutomatic End With With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nesting conditional statements | Excel Discussion (Misc queries) | |||
Nesting 7 statements | Excel Discussion (Misc queries) | |||
Nesting IF statements | Excel Discussion (Misc queries) | |||
nesting if statements | Excel Worksheet Functions | |||
Nesting more than nine IF statements in Excel | Excel Worksheet Functions |