Image location controlled by ActiveX CheckBox

thekamel

New Member
Joined
Feb 11, 2015
Messages
16
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
Hello everyone,

I am trying to get an image location set by ActiveX CheckBox. For example:

When checked, I want image at
Left: 358.5
Top: 1026.75

When unchecked, I want the image at
Left: 1411.75
Top: 1026.75

I have tried searching for anything that would point me into the right direction but I just cannot find anything. Any help would be greatly appreciated!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
to move a shape you just need where you want the left and top of the shape.
VBA Code:
    ActiveSheet.Shapes.Range(Array("Picture 2")).Left = 358.5
    ActiveSheet.Shapes.Range(Array("Picture 2")).Top = 1026.75
 
Upvote 0
Solution
to move a shape you just need where you want the left and top of the shape.
VBA Code:
    ActiveSheet.Shapes.Range(Array("Picture 2")).Left = 358.5
    ActiveSheet.Shapes.Range(Array("Picture 2")).Top = 1026.75
Thank you! This is working exactly the way I needed!
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top