Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a dashboard sheet with a series of (camera) images that are a
thumbnail image of a chart or graph in my reports. I have written three macros that change the size of said image to "Large", "Larger" or "Minimized". I need to create a "SizeChooser" macro that will link to the image and will launch a User Form that simply has three choices, Large, Larger & Minimize, which when clicked will link to the appropriate macro. This "Size Chooser" macro will be associated with the image, so that when the image is clicked, the user gets a popup user form that gives them the choice of what they want to do to view the data contained in that image. I need help setting up the User Form and writing the code that runs the other three macros. Here's the macro code I have for changing the image sizes: Sub Larger() '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# Application.Goto Reference:="R1C1" End Sub Sub Large() 'Select the image and format picture scale to 65% ActiveSheet.Shapes("Picture 53").Select Selection.ShapeRange.LockAspectRatio = msoTrue Selection.ShapeRange.Height = 279.75 Selection.ShapeRange.Width = 231# Selection.ShapeRange.Rotation = 0# Application.Goto Reference:="R1C1" End Sub Sub Minimize() 'Return the image to it's 20% minimized position ActiveSheet.Shapes("Picture 53").Select Selection.ShapeRange.LockAspectRatio = msoTrue Selection.ShapeRange.Height = 86.25 Selection.ShapeRange.Width = 71.25 Selection.ShapeRange.Rotation = 0# Application.Goto Reference:="R1C1" End Sub The other two related issues I need help with a 1) The ability for the code to know which image was clicked and enter the appropriate "Picture Name" as a variable into the ActiveSheet.Shapes("Picture Name").Select line. 2) Is there a better way of de-selecting the image than grabbing a cell, like I'm doing now? I can't leave the image selected... As always, I really appreciate the help! Thanks. Ray |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can MSN Money stock quotes be used in Excel 2007. Smart tags suck | Excel Worksheet Functions | |||
how do i suck a chode | New Users to Excel | |||
user forms | Excel Discussion (Misc queries) | |||
User Forms | Excel Programming | |||
VB user forms | Excel Programming |