Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Clicking a picture


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 515
Default Clicking a picture

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Clicking a picture

On Tue, 5 May 2009 23:19:01 -0700, Kassie
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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 515
Default Clicking a picture

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
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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Clicking a picture

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" wrote in message
...
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
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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Clicking a picture

On Wed, 6 May 2009 09:14:09 -0700, Kassie
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
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Clicking a picture


On Wed, 6 May 2009 12:46:44 -0400, "Rick Rothstein"
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
Inserting a picture object and double-clicking on it opens photo e Kay Excel Discussion (Misc queries) 4 August 12th 08 03:09 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
how do i open a picture file by clicking on a certain cell? amroshious Excel Programming 2 August 3rd 06 09:15 PM
Make graph appear when clicking on picture?! Ed (from UK and useless with comuters!) Charts and Charting in Excel 2 October 19th 05 11:45 PM


All times are GMT +1. The time now is 12:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"