Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear all borders with VBA
Excel XP, Win XP
When I record a macro to clear all borders in the selection, the recorder of course comes back with a list of: ThisBorder = xlNone ThatBorder = xlNone Etc Etc. What is the single statement that clears all borders in the selection? Thanks for your time. Otto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear all borders with VBA
Try this
Range("H8:L22").Select Selection.Borders.LineStyle = xlNone -- -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. "Otto Moehrbach" wrote: Excel XP, Win XP When I record a macro to clear all borders in the selection, the recorder of course comes back with a list of: ThisBorder = xlNone ThatBorder = xlNone Etc Etc. What is the single statement that clears all borders in the selection? Thanks for your time. Otto |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear all borders with VBA
how about something like this
Sub test() Dim b As Border Dim rng As Range Set rng = Range("e3:j11") For Each b In rng.Borders b.LineStyle = xlNone Next End Sub or this Sub test2() Dim b As Border For Each b In Selection.Borders b.LineStyle = xlNone Next End Sub -- Gary "Otto Moehrbach" wrote in message ... Excel XP, Win XP When I record a macro to clear all borders in the selection, the recorder of course comes back with a list of: ThisBorder = xlNone ThatBorder = xlNone Etc Etc. What is the single statement that clears all borders in the selection? Thanks for your time. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Transfer a name from one cell to another but leave clear if clear? | Excel Worksheet Functions | |||
clear the clear the web page email attachment lines | Excel Discussion (Misc queries) | |||
Clear cell borders for blank white page | Excel Discussion (Misc queries) | |||
Clear cell borders for blank white page | Excel Discussion (Misc queries) | |||
Borders | Excel Worksheet Functions |