Excel VBA macros have disappeared
How it started:
Wanted to view Code window and Spreadsheet at same time. In XL VBEditor, Dragged Code window, Project window, and Properties around on screen to accomplish this. Pushed a few toggle buttons such as View Code, Show/Hide folders to see what they did.
What occurred:
Noticed that all modules still listed in project window, but when click on any one module name, the macro routines were missing on the module. For the most part, some comments and the code 'Option Explicit' were still visible, but all the macros=subroutines gone.
More confusing: SOMEtimes if I remove the code line 'Option Explicit', the macros on that particular module reappear.
MOST confusing: If I find a module that shows one macro #1, I can try to write another macro (#2) on that module. When I complete macro #2 which has form Sub NewMacroName(), ..., and End Sub, the second macro #2 is present but the first macro #1 disappears! Remove Sub #2 and Sub #1 reappears
CONCLUSIONS SO FAR:
The macros are clearly hidden, not actually gone.
If I open the Object Browser, I can see a list of Global Classes (each one is a coding module).
If a click on one Global Class, I see a list of Class Members (each one is a subroutine/macro).
I thought it wouldn't be impossible to work in this configuration, but it will be quite inconvenient. Getting back to the original configuration would be a blessing. In reality, either macro routines can't see the personal workbook, or they can't see specific personal macro routines.
Tried to talk with Microsoft about this, but after 30 minutes a service person came back on and said no one is answering today, try again another day. On a workday, I got back to MSFT. MSFT wants $499 to even discuss the problem. Ouch!
Setup: Windows 10 up to date, HP laptop less 6 months old, Excel from Office 2019, although many macros/modules written from Excel 2010. Everything was fine until I started moving window panes around.
Thanks in Advance for your helpful insights. Seems like the end of the line for Excel VBA.
microsoft-excel vba macros
|
show 1 more comment
How it started:
Wanted to view Code window and Spreadsheet at same time. In XL VBEditor, Dragged Code window, Project window, and Properties around on screen to accomplish this. Pushed a few toggle buttons such as View Code, Show/Hide folders to see what they did.
What occurred:
Noticed that all modules still listed in project window, but when click on any one module name, the macro routines were missing on the module. For the most part, some comments and the code 'Option Explicit' were still visible, but all the macros=subroutines gone.
More confusing: SOMEtimes if I remove the code line 'Option Explicit', the macros on that particular module reappear.
MOST confusing: If I find a module that shows one macro #1, I can try to write another macro (#2) on that module. When I complete macro #2 which has form Sub NewMacroName(), ..., and End Sub, the second macro #2 is present but the first macro #1 disappears! Remove Sub #2 and Sub #1 reappears
CONCLUSIONS SO FAR:
The macros are clearly hidden, not actually gone.
If I open the Object Browser, I can see a list of Global Classes (each one is a coding module).
If a click on one Global Class, I see a list of Class Members (each one is a subroutine/macro).
I thought it wouldn't be impossible to work in this configuration, but it will be quite inconvenient. Getting back to the original configuration would be a blessing. In reality, either macro routines can't see the personal workbook, or they can't see specific personal macro routines.
Tried to talk with Microsoft about this, but after 30 minutes a service person came back on and said no one is answering today, try again another day. On a workday, I got back to MSFT. MSFT wants $499 to even discuss the problem. Ouch!
Setup: Windows 10 up to date, HP laptop less 6 months old, Excel from Office 2019, although many macros/modules written from Excel 2010. Everything was fine until I started moving window panes around.
Thanks in Advance for your helpful insights. Seems like the end of the line for Excel VBA.
microsoft-excel vba macros
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
1
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59
|
show 1 more comment
How it started:
Wanted to view Code window and Spreadsheet at same time. In XL VBEditor, Dragged Code window, Project window, and Properties around on screen to accomplish this. Pushed a few toggle buttons such as View Code, Show/Hide folders to see what they did.
What occurred:
Noticed that all modules still listed in project window, but when click on any one module name, the macro routines were missing on the module. For the most part, some comments and the code 'Option Explicit' were still visible, but all the macros=subroutines gone.
More confusing: SOMEtimes if I remove the code line 'Option Explicit', the macros on that particular module reappear.
MOST confusing: If I find a module that shows one macro #1, I can try to write another macro (#2) on that module. When I complete macro #2 which has form Sub NewMacroName(), ..., and End Sub, the second macro #2 is present but the first macro #1 disappears! Remove Sub #2 and Sub #1 reappears
CONCLUSIONS SO FAR:
The macros are clearly hidden, not actually gone.
If I open the Object Browser, I can see a list of Global Classes (each one is a coding module).
If a click on one Global Class, I see a list of Class Members (each one is a subroutine/macro).
I thought it wouldn't be impossible to work in this configuration, but it will be quite inconvenient. Getting back to the original configuration would be a blessing. In reality, either macro routines can't see the personal workbook, or they can't see specific personal macro routines.
Tried to talk with Microsoft about this, but after 30 minutes a service person came back on and said no one is answering today, try again another day. On a workday, I got back to MSFT. MSFT wants $499 to even discuss the problem. Ouch!
Setup: Windows 10 up to date, HP laptop less 6 months old, Excel from Office 2019, although many macros/modules written from Excel 2010. Everything was fine until I started moving window panes around.
Thanks in Advance for your helpful insights. Seems like the end of the line for Excel VBA.
microsoft-excel vba macros
How it started:
Wanted to view Code window and Spreadsheet at same time. In XL VBEditor, Dragged Code window, Project window, and Properties around on screen to accomplish this. Pushed a few toggle buttons such as View Code, Show/Hide folders to see what they did.
What occurred:
Noticed that all modules still listed in project window, but when click on any one module name, the macro routines were missing on the module. For the most part, some comments and the code 'Option Explicit' were still visible, but all the macros=subroutines gone.
More confusing: SOMEtimes if I remove the code line 'Option Explicit', the macros on that particular module reappear.
MOST confusing: If I find a module that shows one macro #1, I can try to write another macro (#2) on that module. When I complete macro #2 which has form Sub NewMacroName(), ..., and End Sub, the second macro #2 is present but the first macro #1 disappears! Remove Sub #2 and Sub #1 reappears
CONCLUSIONS SO FAR:
The macros are clearly hidden, not actually gone.
If I open the Object Browser, I can see a list of Global Classes (each one is a coding module).
If a click on one Global Class, I see a list of Class Members (each one is a subroutine/macro).
I thought it wouldn't be impossible to work in this configuration, but it will be quite inconvenient. Getting back to the original configuration would be a blessing. In reality, either macro routines can't see the personal workbook, or they can't see specific personal macro routines.
Tried to talk with Microsoft about this, but after 30 minutes a service person came back on and said no one is answering today, try again another day. On a workday, I got back to MSFT. MSFT wants $499 to even discuss the problem. Ouch!
Setup: Windows 10 up to date, HP laptop less 6 months old, Excel from Office 2019, although many macros/modules written from Excel 2010. Everything was fine until I started moving window panes around.
Thanks in Advance for your helpful insights. Seems like the end of the line for Excel VBA.
microsoft-excel vba macros
microsoft-excel vba macros
edited Feb 7 at 18:44
Q.Reply
asked Feb 3 at 20:37
Q.ReplyQ.Reply
42
42
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
1
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59
|
show 1 more comment
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
1
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
1
1
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1401664%2fexcel-vba-macros-have-disappeared%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1401664%2fexcel-vba-macros-have-disappeared%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't understand what you mean exactly (and I suspect I'm not alone). Can you upload some screen captures to imgur.com and edit your question to link to them. Showing what you see and pointing out where you expect what would also be helpful.
– cybernetic.nomad
Feb 4 at 22:14
In Excel main window, click on menu - View - Macros - View macros. If all macros are visible, you are safe, nothing has got deleted. It is just hidden. Comment below what you see there?
– VSRawat
Feb 6 at 16:47
1
Following suggestion above: Personal Workbook, on worksheet, selected View Tab: Macros: View Macros --> see list macro routine names (presumably all). If I run arbitrary macro it is there and does run until it stumbles due to a missing variable value. But only that single macro shows on code sheet, not the ones I know are above/ below it on module sheet. This confirms to me that the macros do exist, they are hidden. Further, if on that module that shows a single macro, I add Sub Two_Dummy, then the first macro disappears. If I delete Sub Two_Dummy, then the first macro reappears.
– Q.Reply
Feb 7 at 18:53
could you post a screen shot of your Visual Basic window?
– VSRawat
Feb 8 at 9:30
First, you should take a backup of all your macros to ensure they don't totally disappear in this troubleshooting. As you said you can run each macro one by one, instead of running them, click on edit so that vb editor opens, then you copy entire macros, as many are available, and save them separtely in some text .bas or .vb file. Do this again and again by running different macros there, till you have saved all your macros. Then we can troubleshoot further.
– VSRawat
Feb 8 at 9:59