moving selection box

li3carney

New Member
Joined
Jul 16, 2002
Messages
16
Is there a way using commands or macros to move a selection box? What I mean by selection box is the box itself and not the data that is selected. Sometimes I have a set of complicated selection boxes set up and don't want to redo my multiple selection process all over again. I just want to move it.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
WELCOME TO THE BOARD!

Look in the properties of your SelectionBox and notice the TOP and LEFT properties. You can move objects by assigning a value to these properties. Just add a new value to these properties in your code to move the object.
 

li3carney

New Member
Joined
Jul 16, 2002
Messages
16
I'm assuming you are talking about VBA script here. I took Visual Basic 6, so I am familiar with the concepts, but am in no way proficient. Does somebody have a macro to handle this task?
 

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
The first thing you need to do is determine what event will cause this script to occur. If you are using a ComboBox, this is how the script would look:

ComboBox1.Left = 100
ComboBox1.Top = 200

The values will depend on where you want the ComboBox to end up. If this still doesn't help, give me more detail as to what the user will do in order for this to happen and I'll give you a more detailed script.
 

li3carney

New Member
Joined
Jul 16, 2002
Messages
16
I thought there was a miscommunication. I don't want to move an object.

Let me explain further. Let's say I have cells B14:B22 and cells D14:D22 selected (highlighted). How do I move my selection box (not the data itself) to, say, C16:C24 and E16:E24? Normally, I would select the first set, then ctrl-select the next set. I want to be able to move my selection boxes in unison.
 

Forum statistics

Threads
1,144,770
Messages
5,726,186
Members
422,661
Latest member
foxleinlady

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