PC Review


Reply
Thread Tools Rate Thread

Clicking a picture

 
 
kirkm
Guest
Posts: n/a
 
      6th May 2009

I've got a small picture on Row 1 in my worksheet.

Can it be used to fire an event? I notice a single click
selects handles around it - and d-click brings up the Format
window. Can these be disabled ?

Thanks - Kirk
 
Reply With Quote
 
 
 
 
Kassie
Guest
Posts: n/a
 
      6th May 2009
That's because a single click selects the picture. If you rightclick on this
picture, you can select Assign Macro, and use it as a command button yes.
That is, if you have a macro that you want to "fire" using this picture as a
button.

--
HTH

Kassie

Replace xxx with hotmail


"kirkm" wrote:

>
> I've got a small picture on Row 1 in my worksheet.
>
> Can it be used to fire an event? I notice a single click
> selects handles around it - and d-click brings up the Format
> window. Can these be disabled ?
>
> Thanks - Kirk
>

 
Reply With Quote
 
kirkm
Guest
Posts: n/a
 
      6th May 2009
On Tue, 5 May 2009 23:19:01 -0700, Kassie <(E-Mail Removed)>
wrote:

>That's because a single click selects the picture. If you rightclick on this
>picture, you can select Assign Macro, and use it as a command button yes.
>That is, if you have a macro that you want to "fire" using this picture as a
>button.


Thanks Kassie, that's exactly it. I'm setting it up now but
have struck a snag - I want to call the macro from 2 different sheets
and have the macro detect the name of the worksheet that called it.

Googling around but seem to find everything but. Do you know?

Thanks - Kirk
 
Reply With Quote
 
Kassie
Guest
Posts: n/a
 
      6th May 2009
Exactly what do you mean by "detecting"?
If your macro refers to the active sheet, then whichever sheet "calls" it,
is still the active sheet.
If you tell us what your goal is, then maybe we can offer better assistance

--
HTH

Kassie

Replace xxx with hotmail


"kirkm" wrote:

> On Tue, 5 May 2009 23:19:01 -0700, Kassie <(E-Mail Removed)>
> wrote:
>
> >That's because a single click selects the picture. If you rightclick on this
> >picture, you can select Assign Macro, and use it as a command button yes.
> >That is, if you have a macro that you want to "fire" using this picture as a
> >button.

>
> Thanks Kassie, that's exactly it. I'm setting it up now but
> have struck a snag - I want to call the macro from 2 different sheets
> and have the macro detect the name of the worksheet that called it.
>
> Googling around but seem to find everything but. Do you know?
>
> Thanks - Kirk
>

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      6th May 2009
Just to clarify Kassie's response to you (in case this is all new to you),
there is an ActiveSheet object (with all the properties of a Sheet object)
that is set to the sheet that is currently active when the code is
executing. So, to get your active sheet's name, try something like this...

WhoCalledMe = ActiveSheet.Name

or this...

If ActiveSheet.Name = "Sheet1" Then

or any of a number of different ways.

Note that in the above If..Then statement, the logical test is case
sensitive.

--
Rick (MVP - Excel)


"Kassie" <(E-Mail Removed)> wrote in message
news:3DD1D93B-5A28-48CE-9C1F-(E-Mail Removed)...
> Exactly what do you mean by "detecting"?
> If your macro refers to the active sheet, then whichever sheet "calls" it,
> is still the active sheet.
> If you tell us what your goal is, then maybe we can offer better
> assistance
>
> --
> HTH
>
> Kassie
>
> Replace xxx with hotmail
>
>
> "kirkm" wrote:
>
>> On Tue, 5 May 2009 23:19:01 -0700, Kassie <(E-Mail Removed)>
>> wrote:
>>
>> >That's because a single click selects the picture. If you rightclick on
>> >this
>> >picture, you can select Assign Macro, and use it as a command button
>> >yes.
>> >That is, if you have a macro that you want to "fire" using this picture
>> >as a
>> >button.

>>
>> Thanks Kassie, that's exactly it. I'm setting it up now but
>> have struck a snag - I want to call the macro from 2 different sheets
>> and have the macro detect the name of the worksheet that called it.
>>
>> Googling around but seem to find everything but. Do you know?
>>
>> Thanks - Kirk
>>


 
Reply With Quote
 
kirkm
Guest
Posts: n/a
 
      7th May 2009
On Wed, 6 May 2009 09:14:09 -0700, Kassie <(E-Mail Removed)>
wrote:

>Exactly what do you mean by "detecting"?
>If your macro refers to the active sheet, then whichever sheet "calls" it,
>is still the active sheet.
>If you tell us what your goal is, then maybe we can offer better assistance


I did !! ActiveSheet was it.

Thanks - Kirk
 
Reply With Quote
 
kirkm
Guest
Posts: n/a
 
      7th May 2009

On Wed, 6 May 2009 12:46:44 -0400, "Rick Rothstein"
<(E-Mail Removed)> wrote:

>Just to clarify Kassie's response to you (in case this is all new to you),
>there is an ActiveSheet object (with all the properties of a Sheet object)
>that is set to the sheet that is currently active when the code is
>executing. So, to get your active sheet's name, try something like this...
>
>WhoCalledMe = ActiveSheet.Name
>
>or this...
>
>If ActiveSheet.Name = "Sheet1" Then
>
>or any of a number of different ways.
>
>Note that in the above If..Then statement, the logical test is case
>sensitive.


Thanks Rick... I'm still finding out about objects, properties etc
etc
ActiveSheet.Name solved everything. Now I want ActiveSheet.CurrentRow
but, well, you know - it ain't there! I left a new question on that.
Cheers - Kirk
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i set up pages like google's after clicking on a picture =?Utf-8?B?U3RldmUxNTA1?= Microsoft Frontpage 4 8th Mar 2007 09:52 PM
How do I centre the resulting picture from clicking a thumbnail? =?Utf-8?B?ZGVmcmFpbmU=?= Microsoft Frontpage 2 28th Jun 2006 03:06 PM
Make graph appear when clicking on picture?! =?Utf-8?B?RWQgKGZyb20gVUsgYW5kIHVzZWxlc3Mgd2l0aCBj Microsoft Excel Charting 2 19th Oct 2005 11:45 PM
Re: weird!! clicking on picture opens up program!! John Inzer Windows XP Photos 2 24th Aug 2004 02:59 AM
How to get a slide picture on without clicking my mouse? =?Utf-8?B?bmljb2xhXzQ1Ng==?= Microsoft Powerpoint 2 20th Aug 2004 06:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 AM.