I have a workbook with several command buttons that used to retrieve data, from other sheets, hide and show worksheets and command buttons.
All of a sudden, several, but not all of the buttons wont click. If I step through the code using F8 in the VB window, if the code is to unhide and activate a sheet, the code is taking me to a different sheet.
Is this a known bug? I haven't supplied the code as I know the code works fine
Any help appreciated
Ok, So for some buttons I replaced and this worked, then I noticed in design mode if I just move the buttons to a different location on the same page, exit design mode, then remove back to where I want them to be, all is fine and they work as intended.
Very strange
Related
I have some macros attached to buttons in the Quick Access Ribbon. All but one of the buttons have been functioning normally, so I'm not sure when this started.
I tried to use a less-used macro button this morning called Unhide All Sheets and it threw this error:
Cannot run the macro 'PERSONAL.XLSB!UnhideAllSheets.UnhideAllSheets'. The macro may not be available in this workbook or all macros may be deleted."
So I went to review my code and all my macros are invisible from the front-end. I select Developer -> Macros, the list is completely empty, and when I attempt to create new buttons on the Quick Access Toolbar, the macro list there is also completely empty.
When I hit Alt + F11 to open the VBA editor, I can see and update macros in specific workbooks and in my personal workbook. Most of them still run, although the offending macro (UnhideAllSheets) throws an Unexpected Error (35005) when run from the editor.
Anybody ever seen this before? I've been googling for an hour with no results.
Most Macro Buttons still work
Nothing on the Macro List
Customize Ribbon can't see the macros
Still visible and functioning in VBA Editor (except for "UnhideAllSheets")
I have same issue and I manually checked/marked atpvbaen in the tools>references. This has solved my problem !
I was facing a similar issue, where some buttons were working and some weren't. What I noticed was my module's name was similar to my procedure's (macro's) name. I'm not aware of the reason, but I when ensured procedures names' are different than the module names.
Can anyone please help me with excel issue. I have created a dynamic dashboard in excel using sumifs on data layer and index match functions on presentation layer. I have placed a simple List box form control with no VBA or macro.
My dashboard was working fine, without any issue, but on final step I was just trying to make the List box control float on the sheet with scrolling.
I found a vba code, I opened vba from developer mode, pasted code, but that deleted same.
Since then upon any selection of List box item, it is giving me error “ Cannot run the macro Listbox4_Change. The macro May not be available in this workbook or all macros disabled.”
I have tried pretty much every thing I found on google. Created a macro and deleted, copied one line code in all sheets of vba and deleted, enabled Macro security setting, but nothing really is working .
I am stuck badly.
It sounds like you've added a macro and then removed it, but haven't removed the macro assignment on the list box.
Right-click on the control and choose Assign Macro, delete the Macro name, and hit OK.
I have a button that should be clickable in excel. When I try to click it, nothing happens. I have noticed that if I click and hold the mouse in the lower right hand corner, a second button appears. This has happened in the past, and when I moved the mouse to click that button, I could click and everything would work.
But this time, when I move the mouse, the button goes away. Thus, I cannot make the program work.
Anyone know what could be going on?
UPDATE: I tried to do this with a form control button, but I get the error that the macro is too complex. I have also tried several other active-x controls and they all do the same thing - label, checkbox, dropdown list, etc... Any help with the active-x controls would be greatly appreciated.
I found a solution to the issue. It appears that if you have the excel file open on an additional monitor (I have 3 screens: main + 2 additional), the button gives this quirky behavior. However, if you are the main screen, it works just fine.
I tried this on multiple computers and it was the same on all.
Not sure why that works, but it does for me.
I found that ActiveX command buttons only worked with the first window of a given workbook. I have multiple windows of the same workbook open in the same instance of Excel. ActiveX command buttons worked only with filename.xlsb - 1. ActiveX buttons were inoperable for the workbook's other windows, e.g., filename.xlsb - 2, filename.xlsb - 3, etc. This was irrespective of which monitor had the first window.
If somebody knows how to fix this, I'm all ears. For now, I am converting all my buttons to form controls, which always work fine.
I am seeing buttons disappear throughout Office programs - does anyone know why this may be happening? The first screenshot below is the VBE window when it first opens - if I drag a toolbar to a new location, all of its icons appear, but as soon as the mouse hovers over a button, the image disappears (though the button can still be clicked).
Other times when I open the VBE window, though, all of the buttons display correctly and do not disappear when the mouse cursor moves over them (not sure why this happens sometimes).
The other place I have noticed buttons disappearing is in the popup dialogs that appear when you copy/paste, for example. The buttons and drop-down choices exhibit the same behavior - some images are gone from the start (i.e. the initial pop-up button) and some disappear when the mouse moves over them (the dropdown choice buttons).
I also have this problem quite frequently. My research turned up things like "print = true in the properties" (which I usually don't want), "take focus on click", etc. etc. The only thing I've found that works 100% for me (whether right, wrong or indifferent) is to do the following with each button.
Private Sub CommandButton10_Click()
'__SEARCH FOR SOMETHING BY NAME__
With Me.CommandButton10
.Left = 860.5
.Top = 47.25
.Width = 50.25
.Height = 25.5
End With
'The rest of your code goes here..
End Sub
I know it's a pain to do it this way, and every time you click a button it
resets itself to the position, but I haven't lost a button since I started doing this. Now I do every button I use like this. I too would accept a "proper" fix if someone could come up with one. Hope this helps a little.
I am using an excel 2003 file but running it in excel 2007. I have an issue where suddenly ALL the macro buttons (about 25) disappeared on one of the tabs in my spreadsheet. Macros in the other tabs are not affected. The macros disappear only from the one tab. After several years of having to restore from a master file and update the data, I tried moving the macros (and changing the size slightly) that were on line 1 of the sheet (there are also macros further down the sheet and in different rows) so that they no longer touched the bottom of line 1 and have not had an issue now for 2 weeks. (The issue was happening every day the file was used). I think I suddenly stumbled upon a cure, but time will tell.
I am using excel 2003 on Windows 7. On my laptop left side USB drive G:/ needs something in the root section or all of my Buttons and checkboxes disappear. This happens to all routines written in the last 10 years.
Excel is installed on the C: drive and all files are run and saved there.
My removable drive letters got switch around and so my buttons disappeared when touched and then all of them. I manually set the drive letter of the USB drive back to G:\ and everything appeared as normal with just a few days of panic. A new USB stick in G: will also cause the problem, so whatever is in the root of the old stick I copy over to the new stick. Have not figured out what excel is looking for on the G: drive that causes the images to not show up. I have been to this forum hoping to find an answer over the years so hope this works for someone else.
A few days ago the macro buttons on spreadsheets we created stopped working.
It acted like the buttons weren't even there.
After I searched for and deleted all *.exd files, the buttons once again worked for me.
All other users, though, can't start the macro after I save the file.
Simply - if there's a spreadsheet they're using, it works fine.
Once I open and save on exit, the buttons no longer work for anyone else.
They depress, but won't run the macro.
One thing I did notice on the sheet we use the most:
There are 2 buttons, CommandButton1 and CommandButton2.
If another user clicks on button 1 for instance, and I open the code, a new line is created called CommandButton3 (and 4).
I've tried renaming buttons, etc. but this behavior continues and seems to skirt any of my feeble attempts.
Please help and thank you!