Quick Access Toolbar Customization: Selecting Macros causes Excel to crash - excel

Running Office '10 on Win7
Experience: Some VBA experience, no XML experience
Hi,
I have two issues and an answer to the first may render the second mute.
Q1) Is there a way to get macros in locked add-ins to show up in the QAT macros drop-down? For example, I am running Hyperion and the essexleqd.xla and essexcln.xll add-ins are running. At least some of the macros for these add-ins are visible in the QAT macros drop-down, even though the add-in itself is locked.
Q2) Situation: Excel application is open, but there is no active/visible sheet open. When I go to customize QAT and then select macros from the drop-down, I get an error message and Excel crashes then restarts. Has anyone else encountered this, or know why this happens and has a fix?
Background:
I have a simple add-in that I want to distribute. I have locked it for viewing, but this means that I cannot create a QAT button that references the macro because the macro from the add-in is not visible in the QAT macros drop-down. I have read here (http://www.fontstuff.com/vba/vbatut03.htm) that this happens, but that I should be able to write in the name of the macro somewhere and the button will work.

Q1)
This article should help you.
How to: Create a Custom Menu That Calls a Macro
Q2)
I would guess that they crash because they can't handle that there is no active worksheet open. You probably have to start Excel by opening an empty file in order to workaround the issue.

Related

Macros invisible to excel, but can be run from ribbon if already established, and appear in VBA editor

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.

VBA opens Outlook from a Watch window

Recently I've stumbled upon a strange behaviour of VBA. In my Microsoft Excel Macro-Enabled Worksheet I have several sheets, with one named "Log". While I was debugging a code, I added a new watch with an expression Worksheets("Log"). When I click on the + box in front of it to expand the expression, Welcome to Outlook 2016 wizard pops up?!
On each subsequent click on the expression, New Profile window pops up.
Funny thing is, I don't even use Outlook and it alone cannot be uninstalled from the system and rest of the Office package. So, what is happening here and how can I prevent this strange behaviour?
I have it too, also when I have the watch set to a page of the worksheet.
It seems to happen when I forget to activate the sheet before I access it. After doing that the Macro and watch behave as expected.

.xlam add-in does not work on other computers giving two workbooks with the same name error

I created 2 simple macros just to delete some columns and sort the data on Excel. It does not open a file, just works on the active workbook. I saved the macros as .xlam add-in to distribute other team mates.
I also created a custom Ribbon menu. In the ribbon menu I created 2 buttons and assigned my macros one by one. Now, on my computer, when I click on the button in the Ribbon menu, it calls the macro and the macro works perfectly.
When I add the same add-in to my friends' computers it imports the add-in succesfully. It creates a local copy under Add-In file as well.
When it comes to run the macros, however, it gives the following error ""Sorry, excel can't open two of the same workbooks at the same time".
No need to say there is not 2 workbooks with the same name, there is even no other workbooks opened. What could be the problem? Since it is not code related (at least it seems like) I don't share any code here. If you want I can, however, I receive the error as soon as I click on the button in the ribbon menu on my friends' computers. (FYI I created ribbon menu at my friends' computers as well.)
Any help will be appreciated.
I was able to resolve this issue by removing all of the menu items associated with the add-in (do so by customizing the ribbon) and then rebuilding the menu items. In my situation the location of the add-in changed resulting in a path issue.

excel vba code password protected would not disappear

I have opened an excel file containing VBA password protected (not belonging to me) and from that moment on what happens is that the code remains in the VBA editor even if I close ALL the files (see atteched pic)
Such filed was called treelist and in the VBA editor "solver.XLMA"
Put in other words. Whatever excel of mine I opened now with or without vba code once I click "editor" the first thing I see is that "solver.XLMA" that I can not access nor delete. It is really anoying because I dont know what this code is doing.
(note: yes, I closed excel several times and opened it again. solver.xlma was still there)
As you see in the picture the "solver.xlma" stais even if I close all the excel workbooks.
Some idea of how can I get rid of it and what is going on here?
thx
It is a solver add-in. To turn it off:
Click the File tab, click Options, and then click the
Add-Ins category.
In the Manage box, click Excel Add-ins, and then click Go. The Add-Ins dialog box appears.
In the Add-Ins available box, clear the check box next to the add-in that you want
to deactivade (Solver), and then click OK.
This is the answer:
That's the Solver Add-In. Go to File > Options > Add-Ins, then click Go beside "Manage Excel Add-ins". Uncheck the Solver Add-in and hit Ok

Execute macro ms access in office 365

within ms access office 365, how can I execute a macro.
I don't see a run button in the ribbon tool-bar as I would see normally. So how can i execute the macro and also hints on how to debug the macro if can run
If you open the file with the desktop version of Office then the macros should still work. If you are opening from a browser or web application, then the macros will not be available.
At the point we were developing this, there was no option to write VBA macro code in Access 365. So we used the macro designer surface to create the macro. Once the macro was created, to execute the macro, we created a form and put a button. On the click event of the button we attached this macro to be executed. All these needs to be done through a designer surface. There was no in-line code option
A hint which I learnt, the macro should run under a minute, else the macro will get terminated. So optimize the macro to the best. A technique we used to get around this problem was to split the long running macro into smaller macro's and call each macro one after the other.

Resources