Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Creating a button on Excel Toolbar

Hey guys,

I need when a workbook is opened, for it to create a
button on the Excel toolbar that contains the following
code....

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
Worksheets(1).Range("C5").Select
ActiveSheet.Paste
MsgBox "Data Pasted!", vbOKOnly


I need this button to be visible on ANY workbook opened
after this button is created.


Is this possible?

Thanx

Todd Huttenstine
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating a button on Excel Toolbar

Create your macro and give it a name. Put it in a general module -
probably in Personal.xls would be good.

go to tools=customize and select the second tab (commands)

in the left window select macros and in the right window click and drag the
custom button to the toolbar where you want the button.

Right click on the button and select assign macro - optionally change the
icon if you want an icon displayed.

now you can close the customize dialog.

--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
...
Hey guys,

I need when a workbook is opened, for it to create a
button on the Excel toolbar that contains the following
code....

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
Worksheets(1).Range("C5").Select
ActiveSheet.Paste
MsgBox "Data Pasted!", vbOKOnly


I need this button to be visible on ANY workbook opened
after this button is created.


Is this possible?

Thanx

Todd Huttenstine



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Creating a button on Excel Toolbar

Thank you


-----Original Message-----
Create your macro and give it a name. Put it in a

general module -
probably in Personal.xls would be good.

go to tools=customize and select the second tab

(commands)

in the left window select macros and in the right window

click and drag the
custom button to the toolbar where you want the button.

Right click on the button and select assign macro -

optionally change the
icon if you want an icon displayed.

now you can close the customize dialog.

--
Regards,
Tom Ogilvy

"Todd Huttenstine"

wrote in message
...
Hey guys,

I need when a workbook is opened, for it to create a
button on the Excel toolbar that contains the following
code....

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
Worksheets(1).Range("C5").Select
ActiveSheet.Paste
MsgBox "Data Pasted!", vbOKOnly


I need this button to be visible on ANY workbook opened
after this button is created.


Is this possible?

Thanx

Todd Huttenstine



.

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
Repetive Formatting/Creating a Toolbar button rllngriver Excel Discussion (Misc queries) 11 November 21st 07 01:38 PM
How to modify toolbar button in excel? Reed Excel Discussion (Misc queries) 0 March 28th 07 02:08 AM
How to modify toolbar button in excel? JLatham Excel Discussion (Misc queries) 0 March 28th 07 12:55 AM
Creating a macro that simulates some of the toolbar button Duangruthai New Users to Excel 1 April 22nd 06 12:12 AM
need help creating "AutoSubtotal" toolbar button Paul Simon[_2_] Excel Programming 3 September 22nd 03 03:38 PM


All times are GMT +1. The time now is 10:21 PM.

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"