LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default How to add text box with macro attached

I am trying to add a series of text boxes to a sheet and assign each a
macro, I can add the text boxes ok, but i am unsure how to add a macro, this
is what I tried:

Set MyDocument = Worksheets("Charting")
MyDocument.Shapes.AddTextbox(msoTextOrientationHor izontal, 100, 100, 200,
50).TextFrame.Characters.Text = "Test Box"
Selection.OnAction = "Addtrendline"

Once I have added a shape how do I refer to it (oh how I hanker after the
days when I could just recor4d a macro to find out how to do stuff!).


Thanks and regards, mark


 
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
task bar attached macro name probles bz Excel Programming 2 November 15th 06 02:59 PM
running an XLS Macro from within an XLS attached as Object jaak de vuyst Excel Programming 0 May 7th 06 09:45 AM
Adding text to body of email with workbook attached. aph Excel Programming 3 December 5th 05 03:11 PM
Macro attached to button runs twice Jozef[_2_] Excel Programming 0 November 4th 04 01:36 PM
MACRO ATTACHED TO A TOOLBAR BUTTON Joyce[_2_] Excel Programming 0 October 9th 03 07:30 PM


All times are GMT +1. The time now is 12:17 AM.

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"