jwbennett94
New Member
- Joined
- Jun 1, 2014
- Messages
- 2
Hey Guys,
im using macro coding and trying to use a defined set of values in a code.
so i selected a set of values and defined the name as expansion and this is how i wrote the code
Sub Hide_cells()
'
' Hide_cells Macro
'
'
Sheets("Sheet3").Names("expansion").Borders(xlDiagonalDown).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlDiagonalUp).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeLeft).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeTop).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeBottom).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeRight).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlInsideVertical).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlInsideHorizontal).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").ClearContents
End Sub
this code will not work.. what have i done wrong?
thank you!
im using macro coding and trying to use a defined set of values in a code.
so i selected a set of values and defined the name as expansion and this is how i wrote the code
Sub Hide_cells()
'
' Hide_cells Macro
'
'
Sheets("Sheet3").Names("expansion").Borders(xlDiagonalDown).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlDiagonalUp).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeLeft).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeTop).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeBottom).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlEdgeRight).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlInsideVertical).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").Borders(xlInsideHorizontal).LineStyle = xlNone
Sheets("Sheet3").Names("expansion").ClearContents
End Sub
this code will not work.. what have i done wrong?
thank you!