Clicking a picture

  • Thread starter Thread starter kirkm
  • Start date Start date
K

kirkm

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
 
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
 
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
 
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
 
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.
 
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
 
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
 
Back
Top