Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
robin
 
Posts: n/a
Default custom borders icon to use on the tool bar

I want to make a custome borders icon to use on the tool bar. I need a
double line at the top and a single line at the bottom. PLease help, Robin
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

robin

This is the code I got when I recorded a macro while formatting as you
describe.

Copy/paste to a general module in your workbook. For instructions on creating
a general module see below.

Assign it to a button on your Toolbar.

Sub Macro2()
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub

To get a button to the Toolbar you can.........

ToolsCustomizeCommandsMacros.

Drag the smiley-face to the Toolbar.

Right-click on it a Assign Macro and also "Change Button Image" if you wish.

OK your way out.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.


Gord Dibben Excel MVP

On Thu, 3 Feb 2005 10:09:02 -0800, "robin"
wrote:

I want to make a custome borders icon to use on the tool bar. I need a
double line at the top and a single line at the bottom. PLease help, Robin


  #3   Report Post  
robin
 
Posts: n/a
Default

Thank you,
It works, the only thing is, it does not allow me to undo it without
clearing the borders using the clear borders button. Is there an additional
command I can put into the macros to allow the undo feature to work?
Thanks, Robin

"Gord Dibben" wrote:

robin

This is the code I got when I recorded a macro while formatting as you
describe.

Copy/paste to a general module in your workbook. For instructions on creating
a general module see below.

Assign it to a button on your Toolbar.

Sub Macro2()
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub

To get a button to the Toolbar you can.........

ToolsCustomizeCommandsMacros.

Drag the smiley-face to the Toolbar.

Right-click on it a Assign Macro and also "Change Button Image" if you wish.

OK your way out.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.


Gord Dibben Excel MVP

On Thu, 3 Feb 2005 10:09:02 -0800, "robin"
wrote:

I want to make a custome borders icon to use on the tool bar. I need a
double line at the top and a single line at the bottom. PLease help, Robin



  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

robin

For sample "Undo" code see John Walkenbach's site.

http://www.j-walk.com/ss/excel/tips/tip23.htm


Gord

On Thu, 10 Feb 2005 11:15:02 -0800, "robin"
wrote:

Thank you,
It works, the only thing is, it does not allow me to undo it without
clearing the borders using the clear borders button. Is there an additional
command I can put into the macros to allow the undo feature to work?
Thanks, Robin

"Gord Dibben" wrote:

robin

This is the code I got when I recorded a macro while formatting as you
describe.

Copy/paste to a general module in your workbook. For instructions on creating
a general module see below.

Assign it to a button on your Toolbar.

Sub Macro2()
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub

To get a button to the Toolbar you can.........

ToolsCustomizeCommandsMacros.

Drag the smiley-face to the Toolbar.

Right-click on it a Assign Macro and also "Change Button Image" if you wish.

OK your way out.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.


Gord Dibben Excel MVP

On Thu, 3 Feb 2005 10:09:02 -0800, "robin"
wrote:

I want to make a custome borders icon to use on the tool bar. I need a
double line at the top and a single line at the bottom. PLease help, Robin




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
Trying to delete form border, and it deletes all borders PeterM Excel Discussion (Misc queries) 11 January 3rd 05 03:36 PM
Excel 2002 custom toolbars fick Excel Discussion (Misc queries) 4 December 13th 04 09:51 PM
Custom Header Josh O. Excel Discussion (Misc queries) 1 December 1st 04 06:56 PM
Cant add an icon to toolbars Rasoul Khoshravan Azar Excel Discussion (Misc queries) 1 November 28th 04 08:19 PM
Custom Type Charts Problem Reetesh B. Chhatpar Excel Worksheet Functions 0 November 23rd 04 10:55 AM


All times are GMT +1. The time now is 03: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"