1) The Quick Access Toolbar and the Quick Launch menu are very different animals. The code to modify them isn't even close. Not having 2007 puts me at a disadvantage for creating and testing the code for the QAT, but I think I can manage.
The carriage return/ line feed combination is generated automatically by Excel whenever you press the "Enter" key. I included the statement in case data is copied from another OS or website. Not everybody uses the same new line character. Some use carriage return (ANSI code 13) and others use just a line feed (ANSI code 10).
Add-Ins only appear in the Add-In list where they are either added or removed as needed. Using a hot key is the standard method of calling or starting Add-Ins and macros. It is also possible to create custom menus with the macros that can be selected.
2) Answering this question is difficult because I am not sure I understand your terminology. I will explain a few terms first so you will understand what I am referring to and if it matches what you are referring to.
- Workbook - An Excel file that contains one or more worksheets.
- Worksheet - An object representing a spreadsheet that can contain formulas, graphics, and other programming objects like menus and toolbars.
- Open Workbook - A workbook that has been loaded by Excel and is accessible by the mouse, keyboard, and other input devices.
- Closed Workbook - An existing Excel file that is on the hard disk or network drive but is not open in the Excel program.
- Hidden Workbook - A open workbook whose visible property has been changed from True to False to hide it from view. The allows the workbook to only be accessed through code.
- Program Instance - A copy of a program that is loaded into memory. Some programs only allow a single copy to be present in memory at a time. Others allow multiple copies to be created. Excel allows multiple instances. A single instance of Excel can contain several open workbooks, but the workbooks are not the Excel program.
In my experience, I have never received the error you mention below:
However when the worksheet it’s working on is closed any other Excel spreadsheet/file that is subsequently opened first displays the message “Run-time error ‘1004’: Cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide command.”, to which I can click “End”, “Debug” or “Help” and since I obviously don’t have any VBA knowledge I simply click “End” which opens up the spreadsheet/file.
Once an Add-In has been loaded, it is available to all workbooks in the current instance of Excel. Opening a new workbook should not trigger any errors due to the Add-In's presence. The only hidden workbook would be the Add-In itself, unless you have some macros elsewhere that hide and unhide workbooks.
3) Although you included this in question 2 it really is a separate issue:
Another thing too, once the add-in is fixed, is it possible to have it open and working on all open spreadsheets and any spreadsheets that gets opened later on while it’s working?
I’m asking because from what I’ve seen it only works with the spreadsheet it’s open on, and if I want it to work on another spreadsheet I have to manually open it each time, so I’m wondering if there’s any way to have it work on all sheets by default, like having it act as a standalone add-in that isn’t attached to the spreadsheet it was opened on, meaning if I switch to another spreadsheet the add-in window stays where it is, whether it be a certain spot it’s positioned in on the spreadsheet or maybe a little lower or whatever, this way it doesn’t have to be opened on each spreadsheet, basically having it act as a window of its own that can be minimized etc.
A true standalone is an independent program. Excel Add-Ins are helper files for Excel to expand it capabilities. They are not designed to function without Excel. It is possible to create the illusion that a separate workbook "looks" like a standalone when in fact it is a separate Excel instance running macros with only the UserForm displayed.
A Window or UserForm can be "locked" into position in one of two ways. That is to say, once it is displayed the user can not move it or the window stays on top of all other windows. I think what you are referring to is an independent window like you would find with a stand alone program.
The drawback with the stand alone approach is communication with separate instances of Excel. The way the Windows operating system works it does not normally allow one program to access another program's memory area. To do this requires a lot of API coding for two or more programs to share and modify each others information. If you open all the workbooks in the same instance, with the exception of the stand alone, the task is manageable.
Bookmarks