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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

davesexcel

Well-known Member
Joined
Feb 26, 2006
Messages
1,325
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
 
Solution

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

Forum statistics

Threads
1,181,772
Messages
5,931,942
Members
436,810
Latest member
cantresm

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
Top