Microsoft® Excel® based database addin

 

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    perf Guest

    Default mouse selection of shapes

    Hi all,
    I would like to run some vba code when the user selects a shape or an image.

    the procedure selectionchange() seem not to be useful with shapes but only
    with cells...

    can you please help me?

    thanks

    marco

  2. #2
    John Bundy Guest

    Default RE: mouse selection of shapes

    Right click your shape and choose assign macro, this won't work of course for
    new shapes that the user may put on the sheet that haven't had a macro
    assigned.
    --
    -John http://www.jmbundy.blogspot.com/
    Please rate when your question is answered to help us and others know what
    is helpful.


    "perf" wrote:

    > Hi all,
    > I would like to run some vba code when the user selects a shape or an image.
    >
    > the procedure selectionchange() seem not to be useful with shapes but only
    > with cells...
    >
    > can you please help me?
    >
    > thanks
    >
    > marco


  3. #3
    Dave Peterson Guest

    Default Re: mouse selection of shapes

    Depending on the shape, you may be able to just assign a macro to it. Then when
    the user clicks on the shape, the assigned macro will run.

    Try rightclicking on your shape and see if there's an "assign macro" option.

    If there isn't, you may want to share more info--the shape you used especially.

    perf wrote:
    >
    > Hi all,
    > I would like to run some vba code when the user selects a shape or an image.
    >
    > the procedure selectionchange() seem not to be useful with shapes but only
    > with cells...
    >
    > can you please help me?
    >
    > thanks
    >
    > marco


    --

    Dave Peterson

  4. #4
    perf Guest

    Default Re: mouse selection of shapes

    first of all, thanks to all!

    the fact is that i have created and addin capable of drawing blocks made by
    grouped standard blocks (and block as a box and a text box, or block etc
    etc)...

    the user can create these blocks with a toolbar made by me, and I would like
    to assign a macro when the user click on some of this shapes in order to
    disable the canc button (on some kind of blocks)

    I hope you understood my point. add manually a macro is not good for me,
    this should be assigne automatically by macro...


    thanks for every advice

    marco

    "Dave Peterson" wrote:

    > Depending on the shape, you may be able to just assign a macro to it. Then when
    > the user clicks on the shape, the assigned macro will run.
    >
    > Try rightclicking on your shape and see if there's an "assign macro" option.
    >
    > If there isn't, you may want to share more info--the shape you used especially.
    >
    > perf wrote:
    > >
    > > Hi all,
    > > I would like to run some vba code when the user selects a shape or an image.
    > >
    > > the procedure selectionchange() seem not to be useful with shapes but only
    > > with cells...
    > >
    > > can you please help me?
    > >
    > > thanks
    > >
    > > marco

    >
    > --
    >
    > Dave Peterson
    > .
    >


Similar Threads

  1. Excel Shapes selection problem
    By zen35111@zen.co.uk in forum Programming (VBA, VB, C# etc)
    Replies: 1
    Last Post: 03-07-2009, 01:41 PM
  2. Moving shapes with the mouse
    By pan65 in forum Programming (VBA, VB, C# etc)
    Replies: 2
    Last Post: 02-02-2009, 03:13 AM
  3. Bug, multiple selection of shapes
    By MrT in forum Programming (VBA, VB, C# etc)
    Replies: 1
    Last Post: 01-29-2009, 04:05 PM
  4. How do i read Selection.Shapes.Range(Array(i)?
    By Harry in forum Programming (VBA, VB, C# etc)
    Replies: 2
    Last Post: 01-23-2009, 09:22 PM
  5. Programmatically add shapes to a selection
    By Edward Ulle in forum Programming (VBA, VB, C# etc)
    Replies: 3
    Last Post: 01-23-2009, 01:06 PM

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