LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
PJ PJ is offline
external usenet poster
 
Posts: 112
Default Macro to add button w/code to new worksheet

I'm using an excel file which compiles different reports into one monthly
report file. I have a button that I want added to one of the sheets in the
monthly file. The script recorder gave me the following information to add
the button, but I can't figure out how to get it to assign my existing code
to the new button.

Sheets("Sheet1").Select
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Comma ndButton.1",
Link:=False _
, DisplayAsIcon:=False, Left:=10.5, Top:=55.5, Width:=79.5, Height:= _
31.5).Select
 
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
Macro code behind button bcm2 Excel Worksheet Functions 1 January 13th 10 06:13 PM
Enable or Disable Forms Button on a worksheet from code Corey Excel Programming 1 November 5th 07 12:43 AM
Command button to toggle worksheet event code on / off? Fred[_2_] Excel Discussion (Misc queries) 15 July 31st 07 11:50 AM
How do I code VBA to hit button on a different worksheet? [email protected] Excel Programming 5 August 8th 06 09:39 PM
c# code to add button control to the worksheet!!!! .NetProf Excel Programming 0 January 30th 06 04:45 AM


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