Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Add a Button Programatically plus code

I would like to open a seperate workbook with a macro and add a
button. I would also like to assign the button a macro from the
original workbook.

Then I will need to know how to delete all buttons on a Sheet. Thanks
in advance for any and all help.

thanks,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Add a Button Programatically plus code

On Dec 9, 10:11*am, jlclyde wrote:
I would like to open a seperate workbook with a macro and add a
button. *I would also like to assign the button a macro from the
original workbook.

Then I will need to know how to delete all buttons on a Sheet. *Thanks
in advance for any and all help.

thanks,
Jay


I have found how to add a button and add code to it. With this.
Sub AddFormsRunButton()
Dim cel As Range, newCB As Object

Set cel = ActiveSheet.Range("L15")

Set newCB = ActiveSheet.Buttons.Add(25, 25, 25, 25)
With newCB
.OnAction = "'Price Quotation Sheet.xls'!Mail"
.Characters.Text = "Send Proposal To Customer"
With .ShapeRange
.Left = cel.Left + 3
.Top = cel.Top + cel.Height - 30
.Width = 90
.Height = 40
End With
With .Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With

End Sub
I have also found out how to add the code of Mail. But in mail I
would liek to Delete the button that was created and send via email to
another party. Any help?

Thanks,
Jay
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
VBA code for search button Dylan @ UAFC[_2_] Excel Worksheet Functions 3 November 25th 08 10:59 PM
configure add button & code [email protected] uk Excel Discussion (Misc queries) 7 November 24th 08 02:34 PM
VBA code behind command button [email protected] Excel Worksheet Functions 1 March 22nd 06 08:13 PM
Delete Code Modules Programatically blatham Excel Discussion (Misc queries) 1 February 3rd 06 05:38 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM


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