How to display 2007 excel ribbons - excel

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.

Related

Excel: quick access to an external macro from any spreadsheet

I have a bunch of csv files that I create everyday and that I want to format nicely with colors and stuff.
So I wrote a macro that do all I want.
Now I'm looking for the most practical way to call that macro from Excel.
It looks like macros are stored in the spreadsheet and can't be "global" or "external".
So when I open a csv, I need to create a new macro, paste my vb code, and run it.
It would be great if I could add a button to Excel toolbar, or at least open a menu that will let me select the macro and run it.
It looks like one answer could be to create an excel add-in, but I'm not sure this is the right way to go.
Thanks a lot for your help
This will work with a so-called "Personal Macro Workbook". In Excel 2010, it will be called Personal.xlsb and reside somewhere in your users directory.
See http://office.microsoft.com/en-001/excel-help/copy-your-macros-to-a-personal-macro-workbook-HA102174076.aspx for details. This also applies with small variations to other versions of Excel.

i have a userform in excel which i want to convert to an addin or menu item in excel 2003

i have wriiten a small vba code(userform & modules associated) for concatenating files in a user inputed folderpath. Currently i have this placed in personal.xls and everytime after opening excel i press ALT+F11 and go to the userform and run it (press F5).
I want this userform to be placed in as an addin or menu item in excel (available for all spreadsheets).
I know i need to assign a macro to a menu-item i add, but i have many subs (both in userform & modules associated) and not have instantiated my userform anywhere. i don't know which of these subs i need to assign to menu-item.
MAIN GOAL: is i wan't a menu item (or addin) which when i click pops up the userform. (afterwards running same as when i ran it from visual basic editor).
THINGS TRIED: i tried copying the userform & modules to a new project and saving it as an excel addin (.xla file) and placed the addin in excel add-ins folder. I have selected the addin from Tools>Addins option in excel. But, i think this way i was not able achieve what i needed as i don't see any new option/menu-item added to excel.
Thanks in advance
ps: I'm new to vba and just started working on it a week ago, so give me more detail in your answers.
You did it right with add-in but in order to use your code you need to add menus, check this out.

Recovering datas from an Excel/ActiveX spreadsheet

I'm having the following issue: I've an Excel spreadsheet with a lot of VBA codes and ActiveX controls, including RExcel formulas.
The Excel version is 2007.
When I try to open this file, Task Manager says Excel isn't answering and something starts like if Excel started running endless codes; I deactivated each control and it still seems broken.
I would like to recover at least some formulas I've written in that spreadsheet, but this is actually impossible by opening the spreadsheet in conventional way.
Could you tell me how I can "read" formulas and text in that spreadsheet without opening it by Excel?
Thanks,
Indeed have calculation set to manual for a start.
Now set your security settings such that macros and activeX are disabled:
Excel Options > Trust Center > Trust Center Settings... > Macro Settings > Disable all macros with notification
For ActiveX I am not sure if there is a menu in excel-2007 like for macros, but if there is make sure it is set to not run as well.
Now you can open your excel workbook and it will not run your macro's and shouldn't auto calculate or update!
ADDED: I have had something like this in the past and this is what worked in 1 occasion: install an other office excel application, like open office (the calc application has the excel functionality) and see if it opens in that application. Then if it does, save the file (under another file name) and close it. Open the new file under MS Office Excel, and see what is still recoverable.
Good luck!
use a tool like 7zip to extract the files. the sheets/formulas are in the .xml
the code in a macro enabled spreadsheet is in a .bin file
this can be read with MalOfficeScanner

Can you refer to an external macro with excel?

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.

One RibbonX for multiple Excel 2007 workbooks

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.

Resources