keep losing vba macros for IRibbon menus

G

Guest

Hi all.
This is a really strange thing that no one else has experienced in my office.

I'll copy my macros from one macro module in VBA to another macro module.
I'll then save, ctrl+s, etc... the file.
I'll then close the excel file to continue working on my xlam menu file,
save that, validate, and then generate the callbacks.
All will come up well, etc.... Then, I'll go back into Excel to review, and
test the menu, and find that a specific group of macros are not working. I
then go back into VBA, and find that one specific group of macros that I'd
previously saved-- 15 or 20 times now-- are not there.
I then go to the xlsb file that I'd originally pulled those macros from, and
copy/paste thenm in to the xlam file all over again.
And of course, the process starts all over again.
Fortunately, my xlam menu is now complete, and I'd like to get down to
business.
So, does anyone have any idea as to why this could be happening?
It's getting really old.
As always, thank you in advance.
Have a great day.
 
J

Jim Rech

I don't know if it's the same issue but I lost macros too when I had the
Excel file open in Excel and in the Office Custom UI editor at the same
time. My regimen now is to have it open in only one at a time.
--
Jim
| Hi all.
| This is a really strange thing that no one else has experienced in my
office.
|
| I'll copy my macros from one macro module in VBA to another macro module.
| I'll then save, ctrl+s, etc... the file.
| I'll then close the excel file to continue working on my xlam menu file,
| save that, validate, and then generate the callbacks.
| All will come up well, etc.... Then, I'll go back into Excel to review,
and
| test the menu, and find that a specific group of macros are not working. I
| then go back into VBA, and find that one specific group of macros that I'd
| previously saved-- 15 or 20 times now-- are not there.
| I then go to the xlsb file that I'd originally pulled those macros from,
and
| copy/paste thenm in to the xlam file all over again.
| And of course, the process starts all over again.
| Fortunately, my xlam menu is now complete, and I'd like to get down to
| business.
| So, does anyone have any idea as to why this could be happening?
| It's getting really old.
| As always, thank you in advance.
| Have a great day.
|
 
G

Guest

For me it doesn't matter if the ui editor is open or not.
I lose them regardless.
It's almost as though the save command only works on xlsb file, and xls
files. I.e., it saves fine if I'm editing my xlsb macros, or if I've placed a
macro group within a specific workbook, but if I'm just saving my xlam
macros, certain one's get lost-- over, and over,..... and over,......, and,
......, well you get the point.
 
J

Jim Rech

It's almost as though the save command only works on xlsb file

Just to be clear, the XLSB and the XLS are not add-ins so you can save them
from Excel. But the XLAM is an add-in so it has no visible presence in
Excel, so you're saving that from the VBE, right?

-Everything closed.
-Start Excel.
-Open XLAM and XLSB.
-Copy macros from XLSB to XLAM.
-Save XLAM from VBE.
-Close Excel.
-Start Excel
-Open XLAM.
-Code still there? If Yes..
-Close Excel.
-Open CustomUI editor
-Open XLAM.
-Edit RibbonX
-Save XLAM.
-Close CustomUI editor.
-Open Excel.
-Open XLAM.
-Code must still be there...<g>

--
Jim
| For me it doesn't matter if the ui editor is open or not.
| I lose them regardless.
| It's almost as though the save command only works on xlsb file, and xls
| files. I.e., it saves fine if I'm editing my xlsb macros, or if I've
placed a
| macro group within a specific workbook, but if I'm just saving my xlam
| macros, certain one's get lost-- over, and over,..... and over,......,
and,
| ....., well you get the point.
|
|
| "Jim Rech" wrote:
|
| > I don't know if it's the same issue but I lost macros too when I had the
| > Excel file open in Excel and in the Office Custom UI editor at the same
| > time. My regimen now is to have it open in only one at a time.
| > --
| > Jim
| > | > | Hi all.
| > | This is a really strange thing that no one else has experienced in my
| > office.
| > |
| > | I'll copy my macros from one macro module in VBA to another macro
module.
| > | I'll then save, ctrl+s, etc... the file.
| > | I'll then close the excel file to continue working on my xlam menu
file,
| > | save that, validate, and then generate the callbacks.
| > | All will come up well, etc.... Then, I'll go back into Excel to
review,
| > and
| > | test the menu, and find that a specific group of macros are not
working. I
| > | then go back into VBA, and find that one specific group of macros that
I'd
| > | previously saved-- 15 or 20 times now-- are not there.
| > | I then go to the xlsb file that I'd originally pulled those macros
from,
| > and
| > | copy/paste thenm in to the xlam file all over again.
| > | And of course, the process starts all over again.
| > | Fortunately, my xlam menu is now complete, and I'd like to get down to
| > | business.
| > | So, does anyone have any idea as to why this could be happening?
| > | It's getting really old.
| > | As always, thank you in advance.
| > | Have a great day.
| > |
| >
| >
| >
 
G

Guest

Jim,
That is correct.
the code SHOULD BE THERE.
hmmm.... ok. Now I wanna shoot something.
It is there NOW....
argh....
This brings up another question.
Why????
Why is it that if you have the UI editor open, editing the xlam file, the
code in the VBA editor won't save?
Especially after it shows as being saved. I.e., when you try to save the
xlam menu file in the UI editor, it states, epxlicitly, that as long as any
excel window is open, you cannot use the save command, but doesn't do the
same for the excel program, when the UI editor is open.
While the UI editor is a great utility, it lacks some simple stuff--
being able to save while all files are open. Especially when it comes to
making menus. Opening, and closing files to edit, and make sure that the menu
is configured as desired is incredibly tedious. Perhaps those who are more
skilled can "see" the menu configuration easily enough, but for those of us
who are fairly new to this, it really helps to "see" firsthand what the
configuration is.
The next item that's frustrating, and incredibly so is that each time an
entry is performed in the UI Editor, it jumps back to the top of the window--
if you have any length of code that is longer than a single window's height--
and back down to the line you're editing. That too adds time, and a sense of
frustration in seeking to make changes. One can't make large block
copy/paste-ings, and then edit it quickly. They must wait for the jump
process to cease with each individual entry.
The next thing is-- and perhaps I'm just doing it wrong-- it will not accept
notepad entries. I.e., I've tried making a menu in notepad, and then pasting
it into the UI editor. You would'n't believe the errors that I got. I finally
gave up, and just used, as well as tolerated the "quirky" behavior of the
editor.

Sorry... It's been frustrating making a really long menu, and then having
this latest issue pop up.
But, all that said, I now know that in order to modify my macros in VBA, I
have to do so while the UI editor is closed, and make modifications to my
menu when excel is closed.
 
J

Jim Rech

Why is it that if you have the UI editor open, editing the xlam file, the
I believe it will save but that the UI editor will overwrite the file saved
by Excel if it (the editor) opened the workbook first. The problem is that
Excel does not seem to know that the editor has the file open so it doesn't
open it read-only as it should.

The editor hardly deserves that name. It's good at several key things but
as an editor it sucks. Just so I do not have to repeat myself here's
something I wrote in February here:

------------------
The custom UI editor is a great tool for several things but it is a terrible
pure XML editor. For one thing the text is constantly reformatting as you
type so the screen jumps all over the place. For another it does not
reference the customUI.XSD so you get no intellisense. For another it has
no Find or Find/Replace. For another it does not support
outlining/collapsing...


If you're going to spend any time creating or editing XML files you have to
get a true XML editor. I'm new to actually doing things with XML too, so I
don't know all the editors out there and their pros and cons. But since I
have Visual Studio 2005 I use its built-in XML editor, which supplies all
the things I mentioned above. Folks - INTELLISENSE - you must have this to
get anything done creating Ribbonx. It's great - soooo much easier.


What all XML editors lack (as far as I know) is the ability to do what the
Custom UI editor does - stick your Ribbonx file in the Excel file and create
the needed references to it. When that happens we'll have the tool we
really need. Until then, I create in the VS editor and copy/paste into the
Custom UI editor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top