Command Button Gone Missing

Zakkaroo

Active Member
Joined
Jul 6, 2009
Messages
383
This is probably so simple and stupid .... but im having an issue with a Command Button that keeps wandering away.

I know that it exists, because it won't let me create a duplicate button with the same name, but i cannot find it.

This has happened a few times and previously i've just created a new button, given it a new name and moved the code to the new button, but im getting annoyed with it disappearing and I can't work out if it's one of the users moving it by mistake, or some of the code that i've used that's moving it / hiding it.

So I have 2 questions.

  1. Is there anything I can do, any code I can use to locate the missing button?
  2. Is there any way that I can 'lock' the button in place so that it can't possibly be moved?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Where is the CommandButton from and what's its name? It's not easy for a user to move a CommandButton from the Control Toolbox.
 
Upvote 0
I created the button using the control toolbox and it's called: cmdApply. It sits on a worksheet called Menu.

This probably isn't relevant but when the user enters a Week number into a cell, then clicks the button, (located next to this cell). It then applies that week number to all the other sheets in the workbook.
 
Upvote 0
Let's start with this:

Code:
Sub Test()
    Worksheets("Menu").OLEObjects("cmdApply").Visible = True
End Sub
 
Upvote 0
I have located the button! I should probably have found it earlier, but i missed it because it was so small ... I zoomed out all the way and scrolled around, i found it at the furthest cell to the right.

It's normal location is around cell F6 - G6. I found it at Cell IV6. Im baffled as to why it was all the way over there.

I should probably try to figure out why it's moving ... but failing that, is there anyway to stop it? / lock it down?
 
Upvote 0
In Design mode (button at top left of Control Toolbox) right click the CommandButton and choose Format Control. On the Properties tab check 'Don't move or size with cells' and click OK.
 
Upvote 0
Select Developer Tab, Design Mode, and Properties button from ribbon.
From within the properties view window, select the topmost dropdown selection and select your specific control.
Then select the property called Top. i set it at a low number like 2 or 10.
I had a missing control and it was set at 1700....
This helped me find my control.
Another user posted a great idea to set the control to float and not move with cells.
Hope this helps.




This is probably so simple and stupid .... but im having an issue with a Command Button that keeps wandering away.

I know that it exists, because it won't let me create a duplicate button with the same name, but i cannot find it.

This has happened a few times and previously i've just created a new button, given it a new name and moved the code to the new button, but im getting annoyed with it disappearing and I can't work out if it's one of the users moving it by mistake, or some of the code that i've used that's moving it / hiding it.

So I have 2 questions.

  1. Is there anything I can do, any code I can use to locate the missing button?
  2. Is there any way that I can 'lock' the button in place so that it can't possibly be moved?
 
Upvote 1

Forum statistics

Threads
1,222,088
Messages
6,163,837
Members
451,861
Latest member
Lurch65

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