Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer a name from one cell to another but leave clear if clear? Scoober Excel Worksheet Functions 3 May 22nd 09 02:55 AM
clear the clear the web page email attachment lines MCrider Excel Discussion (Misc queries) 0 November 11th 07 10:05 PM
Clear cell borders for blank white page TJAC Excel Discussion (Misc queries) 2 February 21st 07 02:32 PM
Clear cell borders for blank white page john Excel Discussion (Misc queries) 0 February 21st 07 01:53 PM
Borders anita Excel Worksheet Functions 6 September 15th 06 01:15 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"