SQLDrill.com - Excel Addin for using SQL

Microsoft® Excel® based database addin

 

Go Back   SQL Drill Excel Add-in > Excel > Programming (VBA, VB, C# etc)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-08-2010, 05:01 PM
perf
Guest
 
Posts: n/a
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
Reply With Quote
  #2 (permalink)  
Old 02-08-2010, 05:01 PM
John Bundy
Guest
 
Posts: n/a
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

Reply With Quote
  #3 (permalink)  
Old 02-08-2010, 05:40 PM
Dave Peterson
Guest
 
Posts: n/a
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
Reply With Quote
  #4 (permalink)  
Old 02-09-2010, 10:41 AM
perf
Guest
 
Posts: n/a
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
> .
>

Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
Excel Shapes selection problem zen35111@zen.co.uk Programming (VBA, VB, C# etc) 1 03-07-2009 02:41 PM
Moving shapes with the mouse pan65 Programming (VBA, VB, C# etc) 2 02-02-2009 04:13 AM
Bug, multiple selection of shapes MrT Programming (VBA, VB, C# etc) 1 01-29-2009 05:05 PM
How do i read Selection.Shapes.Range(Array(i)? Harry Programming (VBA, VB, C# etc) 2 01-23-2009 10:22 PM
Programmatically add shapes to a selection Edward Ulle Programming (VBA, VB, C# etc) 3 01-23-2009 02:06 PM


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 |Website Pricer