Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Borders on Fixed # of Columns, Variable # of Rows
Looking to put "std" width borders on all but outside edges of range
which should be "heavy" Getting stuck identifying the "variable" range. Fixed Columns: B3 thru F3 Variable Rows: Any possible number I got: LastRow = Worksheets(1).Cells(Rows.Count, "E").End(xlUp).Row Range ("B3:G" & LastRow) <<<<<<< Comes up as "COMPILE ERROR" Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Borders on Fixed # of Columns, Variable # of Rows
You left off the select on the range statement
Range ("B3:G" & LastRow).select "BEEJAY" wrote: Looking to put "std" width borders on all but outside edges of range which should be "heavy" Getting stuck identifying the "variable" range. Fixed Columns: B3 thru F3 Variable Rows: Any possible number I got: LastRow = Worksheets(1).Cells(Rows.Count, "E").End(xlUp).Row Range ("B3:G" & LastRow) <<<<<<< Comes up as "COMPILE ERROR" Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Borders on Fixed # of Columns, Variable # of Rows
Based on the rest of your code you probably want to select that range. So
just add the .select at the end something like this... Range("B3:G" & LastRow).select -- HTH... Jim Thomlinson "BEEJAY" wrote: Looking to put "std" width borders on all but outside edges of range which should be "heavy" Getting stuck identifying the "variable" range. Fixed Columns: B3 thru F3 Variable Rows: Any possible number I got: LastRow = Worksheets(1).Cells(Rows.Count, "E").End(xlUp).Row Range ("B3:G" & LastRow) <<<<<<< Comes up as "COMPILE ERROR" Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Borders on Fixed # of Columns, Variable # of Rows
Gentlemen:
Thanks for the prompt response. I'll just go and wipe the egg off my face now!!! "Jim Thomlinson" wrote: Based on the rest of your code you probably want to select that range. So just add the .select at the end something like this... Range("B3:G" & LastRow).select -- HTH... Jim Thomlinson "BEEJAY" wrote: Looking to put "std" width borders on all but outside edges of range which should be "heavy" Getting stuck identifying the "variable" range. Fixed Columns: B3 thru F3 Variable Rows: Any possible number I got: LastRow = Worksheets(1).Cells(Rows.Count, "E").End(xlUp).Row Range ("B3:G" & LastRow) <<<<<<< Comes up as "COMPILE ERROR" Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Borders on Fixed # of columns, Variable # of Rows | Excel Programming | |||
Fixed 26 million rows, now 16,000 columns- help help! | Excel Discussion (Misc queries) | |||
Fixed column, variable rows | Excel Programming | |||
Setting borders for two rows and all columns on spread sheet | Excel Worksheet Functions | |||
Printing fixed columns and rows | Excel Programming |