Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Pause Until Mouseclick?

I am working on a reporting dashboard and have created a series of dynamic
charts & graphs with conditional Red/Yellow/Green backgrounds and used the
"camera" feature to capture images which I have reduced to 20% their viewing
size.

I then located these "minimized" images on my dashboard and created a macro,
which is associated with the image, so that when clicked the image gets
maximized or magnigfied for viewing purposes. This way, my directors can see
a lot of data and only drill down on the metrics that are of interest to
them, as indicated by the color scheme.

Instead of creating two macros, I figured it would be far easier to
maximize, pause and then return the image to it's minimized state. I want the
pause to last only until the user clicks their mouse again.

Here's the code I am using now:

Sub TempMag()
'Select the image and format picture scale to 100%
ActiveSheet.Shapes("Picture 53").Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 431.25
Selection.ShapeRange.Width = 356.25
Selection.ShapeRange.Rotation = 0#

'I need code here that simply pauses and waits
'for the user to click their mouse again...

'Return the image to it's 20% minimized position
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 86.25
Selection.ShapeRange.Width = 71.25
Selection.ShapeRange.Rotation = 0#
Cell(A1).Select
End Sub

As always, thanks!
Ray
Trying to make reporting so easy... a monkey could run them!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Pause Until Mouseclick?

1. put a picture on the worksheet
2. right-click the picture and select:
View Code
You can either associate a macro with the picture or assign the picture to a
macro in a standard module.
--
Gary''s Student - gsnu200746


"RayportingMonkey" wrote:

I am working on a reporting dashboard and have created a series of dynamic
charts & graphs with conditional Red/Yellow/Green backgrounds and used the
"camera" feature to capture images which I have reduced to 20% their viewing
size.

I then located these "minimized" images on my dashboard and created a macro,
which is associated with the image, so that when clicked the image gets
maximized or magnigfied for viewing purposes. This way, my directors can see
a lot of data and only drill down on the metrics that are of interest to
them, as indicated by the color scheme.

Instead of creating two macros, I figured it would be far easier to
maximize, pause and then return the image to it's minimized state. I want the
pause to last only until the user clicks their mouse again.

Here's the code I am using now:

Sub TempMag()
'Select the image and format picture scale to 100%
ActiveSheet.Shapes("Picture 53").Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 431.25
Selection.ShapeRange.Width = 356.25
Selection.ShapeRange.Rotation = 0#

'I need code here that simply pauses and waits
'for the user to click their mouse again...

'Return the image to it's 20% minimized position
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 86.25
Selection.ShapeRange.Width = 71.25
Selection.ShapeRange.Rotation = 0#
Cell(A1).Select
End Sub

As always, thanks!
Ray
Trying to make reporting so easy... a monkey could run them!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Pause Until Mouseclick?

Ray,

I think the pausing idea is tough to execute, you'd have to use OnTime, I
think, and I always try to avoid using that if possible.

I think the code below will give you a start. It assumes you have 5 pics on
Sheet1, named "Picture 1", "Picture 2", etc.. It simply toggles each
clicked picture to be bigger or smaller. I've never actually used a static
variable, but I think it's what's needed he

Sub PicClick()
Static blnPicIsMagnified(1 To 5) As Boolean ' adjust for number of pics
Const MAGNIFICATION_FACTOR As Long = 5' adjust to change magnification

blnPicIsMagnified(Replace(Application.Caller, "Picture ", "")) = _
Not blnPicIsMagnified(Replace(Application.Caller, "Picture ", ""))
With Worksheets(1).Shapes(Application.Caller)
If blnPicIsMagnified(Replace(Application.Caller, "Picture ", "")) Then
.Height = .Height * MAGNIFICATION_FACTOR 'assumes aspect ratio is
locked, width will follow
Else
.Height = .Height / MAGNIFICATION_FACTOR
End If
End With
End Sub

hth,

Doug

"RayportingMonkey" wrote in
message ...
I am working on a reporting dashboard and have created a series of dynamic
charts & graphs with conditional Red/Yellow/Green backgrounds and used the
"camera" feature to capture images which I have reduced to 20% their
viewing
size.

I then located these "minimized" images on my dashboard and created a
macro,
which is associated with the image, so that when clicked the image gets
maximized or magnigfied for viewing purposes. This way, my directors can
see
a lot of data and only drill down on the metrics that are of interest to
them, as indicated by the color scheme.

Instead of creating two macros, I figured it would be far easier to
maximize, pause and then return the image to it's minimized state. I want
the
pause to last only until the user clicks their mouse again.

Here's the code I am using now:

Sub TempMag()
'Select the image and format picture scale to 100%
ActiveSheet.Shapes("Picture 53").Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 431.25
Selection.ShapeRange.Width = 356.25
Selection.ShapeRange.Rotation = 0#

'I need code here that simply pauses and waits
'for the user to click their mouse again...

'Return the image to it's 20% minimized position
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 86.25
Selection.ShapeRange.Width = 71.25
Selection.ShapeRange.Rotation = 0#
Cell(A1).Select
End Sub

As always, thanks!
Ray
Trying to make reporting so easy... a monkey could run them!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Pause Until Mouseclick?

Isn't this exactly how a MsgBox works? I'm not sure if that's what you're
shooting for but if the box wouldn't block the data you're trying to show I
think it will work just fine. You could add a line of explanatory text like
"Click OK to ..."


--
n00b lookn for a handout :)


"RayportingMonkey" wrote:

I am working on a reporting dashboard and have created a series of dynamic
charts & graphs with conditional Red/Yellow/Green backgrounds and used the
"camera" feature to capture images which I have reduced to 20% their viewing
size.

I then located these "minimized" images on my dashboard and created a macro,
which is associated with the image, so that when clicked the image gets
maximized or magnigfied for viewing purposes. This way, my directors can see
a lot of data and only drill down on the metrics that are of interest to
them, as indicated by the color scheme.

Instead of creating two macros, I figured it would be far easier to
maximize, pause and then return the image to it's minimized state. I want the
pause to last only until the user clicks their mouse again.

Here's the code I am using now:

Sub TempMag()
'Select the image and format picture scale to 100%
ActiveSheet.Shapes("Picture 53").Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 431.25
Selection.ShapeRange.Width = 356.25
Selection.ShapeRange.Rotation = 0#

'I need code here that simply pauses and waits
'for the user to click their mouse again...

'Return the image to it's 20% minimized position
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 86.25
Selection.ShapeRange.Width = 71.25
Selection.ShapeRange.Rotation = 0#
Cell(A1).Select
End Sub

As always, thanks!
Ray
Trying to make reporting so easy... a monkey could run them!

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
use mouseclick to dynamically change chart series? Chart_beforeDoubleClick? KR Excel Programming 2 June 15th 06 03:20 PM
Activating macro on mouseclick Hmmm Excel Programming 1 March 13th 06 12:46 PM
Circular reference after mouseclick Mark ten berge Excel Programming 2 October 5th 05 12:16 PM
mouseclick events animal1881[_4_] Excel Programming 1 August 18th 04 05:55 PM
API's and Mouseclick Dave Peterson[_3_] Excel Programming 2 August 14th 03 03:00 AM


All times are GMT +1. The time now is 04:07 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"