How to Enlarge or Shrink a Picture with One Click in Excel
Resizing pictures in Excel with one click can make your workbook more visually appealing and your data easier to digest. Here's how to do it:
Step 1: Insert Your Picture
First, insert the picture into your Excel worksheet.
Step 2: Set up a Macro
Next, you'll need to set up a macro. Macros are sets of instructions that automate tasks in Excel. In this case, the task is resizing an image.
Step 3: Write the Macro
Write a macro that changes the height and width properties of the picture. For example, the following macro enlarges a selected picture by 10%:
Sub EnlargePic()
With Selection.ShapeRange
.LockAspectRatio = msoTrue
.Height = .Height * 1.1
.Width = .Width * 1.1
End With
End Sub
Similarly, this macro shrinks a selected picture by 10%:
Sub ShrinkPic()
With Selection.ShapeRange
.LockAspectRatio = msoTrue
.Height = .Height * 0.9
.Width = .Width * 0.9
End With
End Sub
Step 4: Assign the Macro
Assign the macro to a form control button, such as a push button.
Step 5: Resize the Picture
Finally, select the picture and click the button to resize the picture according to the macro's instructions.