Closed Thread
Results 1 to 5 of 5

Assign a Macro to a cell

  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    47

    Assign a Macro to a cell

    Hello all,

    How can I assign a macro to a cell. What I want to do is be able to, for example, click on cell B2 and have some text appear on cell B10. Is that possible? If so can you help, thank you.
    Last edited by VBA Noob; 02-27-2007 at 03:56 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Try an event macro.

    Right click the sheet you want the change to happen to then select View Code and paste in the below

    Please Login or Register  to view this content.
    more on Event macro's can be found on the attached link

    http://www.cpearson.com/excel/events.htm


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    47

    Talking

    Quote Originally Posted by VBA Noob
    Hi,

    Try an event macro.

    Right click the sheet you want the change to happen to then select View Code and paste in the below

    Please Login or Register  to view this content.
    more on Event macro's can be found on the attached link

    http://www.cpearson.com/excel/events.htm


    VBA Noob
    Thank you so much VBA Noob, that worked perfectly

  4. #4
    Registered User
    Join Date
    01-28-2011
    Location
    phila, pa
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Assign a Macro to a cell

    Hello, How do I assign a Macro to a cell that will execute the “Insert, Object, Create from File (tab), Display as icon, Browse”. And then let a person choose their own file to insert.

    I checked that website you suggested http://www.cpearson.com/excel/Events.aspx and found the Object Browser in the VBA Editor. Then I found “File Search” in the Classes list. But I’m not sure what to choose from the “Members of File Search” list. Can you help? Am I even in the ballpark? Thanks, db

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Assign a Macro to a cell

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1