If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Deleting part of a border in VBA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-12, 06:47
OB1 OB1 is offline
Registered User
 
Join Date: Dec 2007
Posts: 69
Deleting part of a border in VBA

Hi,

I have the following code that adds a border to the top of a cell:

Code:
rngCell.Offset(0, -1).Borders.Item(xlEdgeTop).Weight = xlThick
This work fine but how do I do the complete opposite? I cant use code that deletes all borders as I may have borders on the bottom that I dont want deleting!

Any help would be great

Thanks,

OB1
Reply With Quote
  #2 (permalink)  
Old 02-02-12, 08:19
MikeTheBike MikeTheBike is offline
Registered User
 
Join Date: Apr 2004
Location: Derbyshire, UK
Posts: 714
Hi

You could try this
Code:
rngCell.Offset(0, -1).Borders.Item(xlEdgeTop).LineStyle = xlNone
MTB
Reply With Quote
  #3 (permalink)  
Old 02-02-12, 09:36
OB1 OB1 is offline
Registered User
 
Join Date: Dec 2007
Posts: 69
Thanks Mike worked a treat
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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