LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default toggle borders macro

I'm trying to create a macro that will cycle between border options.
(edgetop, edgeright,edgebottom, edgeleft, outline cell)

I have been trying to do this using the select case function but have
been unsuccessful. Is it possible to have multiple prerequisites with
the select case function?

My main problem is dealing with the (xlEdgetop) modifier in the select
case function.

Thanks for the help1

Sub ToggleBorders()
With Selection
Select Case .Borders.LineStyle
Case xlNone
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
End Select
End With
End Sub
 
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
Toggle between two workbooks via MACRO Aligi Excel Discussion (Misc queries) 2 July 8th 08 08:43 PM
Toggle Macro Beep Beep Excel Programming 3 July 10th 07 12:29 PM
Toggle comments on or off macro Jim G Excel Discussion (Misc queries) 3 October 5th 06 04:07 AM
Macro Toggle On/Off Chipmunk Excel Programming 4 May 15th 06 08:21 PM
Toggle Macro Michael Excel Programming 5 June 11th 04 03:18 PM


All times are GMT +1. The time now is 10:09 AM.

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"