ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   create button in excel toolbar (https://www.excelbanter.com/excel-programming/344721-create-button-excel-toolbar.html)

owl527[_8_]

create button in excel toolbar
 

I have created a macro to process some data from a file that I receive
daily. How I do turn that macro into a button in the excel toolbar so
then I can just click the button each time I want to process a similar
file? I don't want to copy and paste the code everytime I get that
file. Please let me know. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127


Nigel

create button in excel toolbar
 
You can create a custom toolbar by right clicking in an empty area of the
Excel toolbar area, choose the last item "Customize". Choose Toolbars from
the dialog and then click New, give your toolbar a Name. This appears as a
blank toolbar, now click Commands from the original dialog - scroll down to
Macro and click this item - drag Custom Button into your customer toolbar
(you might have to move the dialog to see it). On your new toolbar right
click the new icon just dropped in and select assign macro - choose the
macro from the list.

You will see when you right click the icon you can change a number of other
things - icon, text etc..... experiment with this as required. You can
attach your toolbar by dragging it to the main tool bar area, enable /
disable it using the customise option etc. If you exit Excel with the
toolbar enabled then it will appear next time you open Excel.

If the macro is required to act on a number of different files you open,
place your macro in your "Personal Workbook Area" it will then be available
whenever you open Excel - (of course only you will have this).
--
Cheers
Nigel



"owl527" wrote in
message ...

I have created a macro to process some data from a file that I receive
daily. How I do turn that macro into a button in the excel toolbar so
then I can just click the button each time I want to process a similar
file? I don't want to copy and paste the code everytime I get that
file. Please let me know. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile:

http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127




owl527[_9_]

create button in excel toolbar
 

This is great. but how do I send this "button" to someone else through
email? so then the other person can use it too? Please help. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127


Carlos[_6_]

create button in excel toolbar
 
try

Sub Macro1()

Dim oCell As Range
Set oCell = Range("e2")'selet your cell

l = oCell.Left
t = oCell.Top
h = oCell.Height
w = oCell.Width

ActiveSheet.Shapes.AddShape msoShapeOval, l, t, w, h
End Sub



Carlos[_6_]

create button in excel toolbar
 
Sorry paralaxe

"Carlos" wrote in message
...
try

Sub Macro1()

Dim oCell As Range
Set oCell = Range("e2")'selet your cell

l = oCell.Left
t = oCell.Top
h = oCell.Height
w = oCell.Width

ActiveSheet.Shapes.AddShape msoShapeOval, l, t, w, h
End Sub





owl527[_10_]

create button in excel toolbar
 

hello, I don't think that is what I want. I want to be able to assign a
macro and put it in the toolbar. Then send the toolbar to another
person. Please help!!!


--
owl527
------------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127


Nigel

create button in excel toolbar
 
Your original request talked in terms of 'you' running it - if you need to
do this for a number of other users then you will need to run some code to
create the toolbar, since your toolbars are stored in a local xlb file.

There are a number of solutions to this but for a general introduction try
.....
http://www.mvps.org/dmcritchie/excel/toolbars.htm


--
Cheers
Nigel



"owl527" wrote in
message ...

This is great. but how do I send this "button" to someone else through
email? so then the other person can use it too? Please help. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile:

http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127




Reva

create button in excel toolbar
 
I need exactly what you said to do. BUT I do not have ANY choices when I click
on Macros in the Customize box. Any suggestions?

"Nigel" wrote:

You can create a custom toolbar by right clicking in an empty area of the
Excel toolbar area, choose the last item "Customize". Choose Toolbars from
the dialog and then click New, give your toolbar a Name. This appears as a
blank toolbar, now click Commands from the original dialog - scroll down to
Macro and click this item - drag Custom Button into your customer toolbar
(you might have to move the dialog to see it). On your new toolbar right
click the new icon just dropped in and select assign macro - choose the
macro from the list.

You will see when you right click the icon you can change a number of other
things - icon, text etc..... experiment with this as required. You can
attach your toolbar by dragging it to the main tool bar area, enable /
disable it using the customise option etc. If you exit Excel with the
toolbar enabled then it will appear next time you open Excel.

If the macro is required to act on a number of different files you open,
place your macro in your "Personal Workbook Area" it will then be available
whenever you open Excel - (of course only you will have this).
--
Cheers
Nigel



"owl527" wrote in
message ...

I have created a macro to process some data from a file that I receive
daily. How I do turn that macro into a button in the excel toolbar so
then I can just click the button each time I want to process a similar
file? I don't want to copy and paste the code everytime I get that
file. Please let me know. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile:

http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127





Reva

create button in excel toolbar
 
Nigel, sorry I totally exited and tried again, and it worked. Thank You.

"Nigel" wrote:

You can create a custom toolbar by right clicking in an empty area of the
Excel toolbar area, choose the last item "Customize". Choose Toolbars from
the dialog and then click New, give your toolbar a Name. This appears as a
blank toolbar, now click Commands from the original dialog - scroll down to
Macro and click this item - drag Custom Button into your customer toolbar
(you might have to move the dialog to see it). On your new toolbar right
click the new icon just dropped in and select assign macro - choose the
macro from the list.

You will see when you right click the icon you can change a number of other
things - icon, text etc..... experiment with this as required. You can
attach your toolbar by dragging it to the main tool bar area, enable /
disable it using the customise option etc. If you exit Excel with the
toolbar enabled then it will appear next time you open Excel.

If the macro is required to act on a number of different files you open,
place your macro in your "Personal Workbook Area" it will then be available
whenever you open Excel - (of course only you will have this).
--
Cheers
Nigel



"owl527" wrote in
message ...

I have created a macro to process some data from a file that I receive
daily. How I do turn that macro into a button in the excel toolbar so
then I can just click the button each time I want to process a similar
file? I don't want to copy and paste the code everytime I get that
file. Please let me know. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile:

http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=482127






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com