I have an Excel 2003 VBA solution I'm converting to Excel 2007. The solution had a large collection of menus that were used between multiple workbooks. I've created RibbonX to replicate this functionality, but now I'm to the point where I want to make my Ribbon show up on all these workbooks. How do I go about this? When I switch from one workbook to another the Ribbon disappears. This isn't a VSTO solution just to be clear it is straight Excel with VBA. I'm hopeful you don't have to put the RibbonX into each workbook.
You need to save it as an add-in (.xlam), which can then be added by other users. This will keep it visible for all workbooks.
Related
I have an add-in that helps fill Excel tables with data from Atlassian Jira, used by several kinds of Excel files. The add-in has been created with the Excel VBA editor, not VSTO.
Now I need to use the functions of this add-in from macros in a Word template.
To avoid duplicating the code base, I would like to use this add-in in Word.
Trying to add a reference to the Excel add-in in Word triggers the error "Can't add a reference to the specified file".
Is there a reasonably simple way to achieve this?
If you want the best next thing you can do is inserting Excel table into Word document and then adding to that document your VBA code.
To add the Excel tabel just use Insert -> Table -> Excel Spreadsheet -> your toolbar will change to excel toolbar with the option for adding your VBA code like in Excel.
I have a vba code in my .xlsm excel file. When i edit it online, my code does not work. But it works when i have been editing it in Work book.
Why is this so?
The vba code contains a code for stoping duplicate value entry for a column in excel
Short answer is that you can open workbooks containing macros online but you can't do anything with the code.
Work with macros in Excel Online
Although you can't work with macros in Excel Online, you can open a
workbook that contains macros—though you won't be able to see the
macros. You can edit the worksheets and save a workbook containing
macros in Excel Online. The macros will remain in the workbook, and
you open the workbook in the Excel desktop application to view and
edit the macros.
Bottom line: Use Excel desktop application to work with macros.
You can vote for it as a feature here:
Developer tab, macros, custom add-ins for online Excel
Im working with MS Excel files and need to copy/transfer pars from one excel file to an other. (I know it is possible to copy sheets... but there has to be a better solution)
I'm working with multiple monitors/screens to display MS Excel file. (but all on juist one Computer. But somehow i cant display two files at the same time.
Is there a way to solve this?
What is the reason this isn't possible? (is it because, in Excel VBA macro's there can only be one open workbook. to prevent you ending up accedently editting multiple excel files at the same time?)
I don't think so, because the shoeld both be able to be vieuwed at the same time... but i only need one to be selected to edit.
Specs:
- Dell Workbook
- Window 7 Professional
- MS Excel (Office 2010)
Thanks in advance,
best regards, Cornelis
In excel 2010, each time the excel application is opened it can have many workbooks open. See the max/min/restore buttons in the top right corner of the excel window. There is one set for excel and another set for the active workbook. Restore the workbook window and you will be able to arrange it and any other workbook that are open.
Note that you can copy sheets between any workbook open in the same iinstance of excel.
you can open excel more than once (ie opening many instances) and the workbooks open in each instance are treated differently than when they are all opened in one instance.
I was looking for a vba method to hide al excel ribbons on file startup.
From this website I copied into my worksheet's "Thisworkbook" two subroutines that hide all ribbons upon file activation and show them again on file deactivation.
This worked.
However, I need to know how to get back to all my macros?
Every time I start the spreadsheet the ribbons are hidden by my vba code. How do I get to the ribbons and perform other editing on my workbook?
I have searched for a solution to no avail.
how to get back to all my macros?
You mean start VBA IDE?
Alt-F11 does it.
I have a reasonably complex macro that I need to run on multiple different excel sheets, this macro is updated periodically and whenever a change is made its necessary to change it in each individual excel sheet. is there a way to get each excel document to refer to the one macro?
for example if i had a hierarchy like this:
DOCUMENTS:
-xlsheet1.xls
-xlsheet3.xls
-xlsheet2.xls
MACROS:
-macro1.bas
where there was a button in each sheet that ran macro1 when clicked.
I would recommend either moving that macro to your personal file or create an Add-In
Working with Personal File
Topic: Create and save all your macros in a single workbook
Link: https://support.microsoft.com/en-us/office/create-and-save-all-your-macros-in-a-single-workbook-66c97ab3-11c2-44db-b021-ae005a9bc790
Quote from the above link:
When you first create a macro in a workbook, it works only in that workbook. But what if you want to use the macro in other workbooks? To make your macros available every time you open Excel, you can create them in a workbook called Personal.xlsb. That’s a hidden workbook stored on your computer, which opens in the background every time you open Excel.
Creating an Add-In
Topic: Creating Excel Add-ins
Link: http://www.ozgrid.com/VBA/excel-add-in-create.htm
Quote from the above link:
I am often asked by users 'what is the best way to distribute their macros?' My answer, is without doubt via an Excel Add-in. After all, this is what Add-ins are for. For those that are not sure what an Excel add-in is, it's is nothing more than an Excel Workbook that has been saved as an Add-in, File>Save as \ Microsoft Excel Add-in (*.xla). Once saved and re-opened the Workbook will be hidden and can only be seen in the "Project Explorer" via the Visual Basic Editor. It is NOT hidden in the same way as the Personal.xls as this can be seen (and made visible) via Windows>Unhide.
The Personal file is good for having a macro across any number of workbooks on a single computer. In a networked environment with multiple users, you could simulate the Personal file by having a single workbook with your macros in it and coding all other workbooks to open and hide this workbook when they start up.