#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Create an icon

How to create an icon on my toolbar, clicking on which, will perform some
defined tasks?

Example of my expected result: Clicking on that icon once, make the selected
cell into bold, italics, underlined and centered.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Create an icon

A good question!

First create a macro to do the formatting and then:

View Toolbars Customize... (way at the bottom of the drop-down)

Commands Macros and drag the custom buttton onto the toolbar.

Finally assign the macro to the new button.

--
Gary''s Student - gsnu200844


"Aruna" wrote:

How to create an icon on my toolbar, clicking on which, will perform some
defined tasks?

Example of my expected result: Clicking on that icon once, make the selected
cell into bold, italics, underlined and centered.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Create an icon

And how to create a macro please

"Gary''s Student" wrote:

A good question!

First create a macro to do the formatting and then:

View Toolbars Customize... (way at the bottom of the drop-down)

Commands Macros and drag the custom buttton onto the toolbar.

Finally assign the macro to the new button.

--
Gary''s Student - gsnu200844


"Aruna" wrote:

How to create an icon on my toolbar, clicking on which, will perform some
defined tasks?

Example of my expected result: Clicking on that icon once, make the selected
cell into bold, italics, underlined and centered.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Create an icon

Here is the macro you requi

Sub Formatt()
Dim r As Range
For Each r In Selection
r.HorizontalAlignment = xlCenter
r.Font.FontStyle = "Bold Italic"
r.Font.Underline = xlUnderlineStyleSingle
Next
End Sub

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To use the macro from the normal Excel window:

1. ALT-F8
2. Select the macro
3. Touch Run



To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

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

--
Gary''s Student - gsnu200844


"Aruna" wrote:

And how to create a macro please

"Gary''s Student" wrote:

A good question!

First create a macro to do the formatting and then:

View Toolbars Customize... (way at the bottom of the drop-down)

Commands Macros and drag the custom buttton onto the toolbar.

Finally assign the macro to the new button.

--
Gary''s Student - gsnu200844


"Aruna" wrote:

How to create an icon on my toolbar, clicking on which, will perform some
defined tasks?

Example of my expected result: Clicking on that icon once, make the selected
cell into bold, italics, underlined and centered.

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
Create a macro so when I click the icon, the response is the A1 ce Winnipeg Michael Excel Discussion (Misc queries) 10 September 11th 08 03:06 PM
why does excel create a new desktop icon when file is saved? PLEES Setting up and Configuration of Excel 0 August 3rd 08 10:24 PM
How to create icon sets for excel 2007 conditionnal formating ? Julien Montserrat Excel Discussion (Misc queries) 1 January 30th 07 05:50 PM
Is there a way to create a toolbar icon for 'page setup'? Dana Excel Worksheet Functions 2 March 24th 06 06:15 PM
How do I create a pivot table if the pivot table icon or menu ite. Lynn@WS Charts and Charting in Excel 1 December 16th 04 02:36 AM


All times are GMT +1. The time now is 03:45 PM.

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

About Us

"It's about Microsoft Excel"