vba 个人宏工作簿丢失(再次)!

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21244888/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 17:35:06  来源:igfitidea点击:

Personal Macro Workbook has gone missing (AGAIN)!

excelexcel-vbavba

提问by Felipe

I don′t understand why, but it′s the second or third time I've lost my Personal Workbook with all my macro copies. The only different thing that I've done was editing a macro but, when excel was closing, I haven't saved the changes. Next time I've opened excel, surprise, surprise, no Personal Workbook! Has anyone had the same problem? Does anyone know why it happens? I have already searched in (I believe so) all possible folders where It could be stored.

我不明白为什么,但这是我第二次或第三次丢失带有所有宏副本的个人工作簿。我所做的唯一不同的事情是编辑宏,但是当 excel 关闭时,我没有保存更改。下次我打开excel时,惊喜,惊喜,没有个人工作簿!有没有人遇到过同样的问题?有谁知道为什么会这样?我已经搜索了(我相信是这样)所有可以存储它的文件夹。

Thanks!

谢谢!

回答by Alec David Whitworth

the file can be found for 2007/2010 users in :

可以在 2007/2010 用户中找到该文件:

C:\Users\User ID\AppData\Roaming\Microsoft\Excel\XLSTART

C:\Users\User ID\AppData\Roaming\Microsoft\Excel\XLSTART

or somewhere similar for others.

或其他类似的地方。

Hope this helps

希望这可以帮助

回答by Pierre

The folder where the personal macros are saved can be found by using the command:

使用以下命令可以找到保存个人宏的文件夹:

?Application.StartupPath(without ""sign) in VBA.

?Application.StartupPath(无""符号)在 VBA 中。

Open VBA (ALT+F11) and enter the command in the field on the bottom.

打开 VBA ( ALT+ F11) 并在底部的字段中输入命令。

Hope this helped

希望这有帮助

回答by Donald.M

For those using MacOS / OSX (El Capitan) with Excel 2016 I located my copy of Personal Macro Workbook.xlsb, which I had previously unhidden in Excel, then closed, in the following location:

对于那些使用 MacOS/OSX (El Capitan) 和 Excel 2016 的人Personal Macro Workbook.xlsb,我在以下位置找到了我之前在 Excel 中取消隐藏的副本,然后关闭:

~/Library/Containers/com.microsoft.Excel/Data/Application Support/User/Personal Macro Workbook.xlsb

Please note that I used multiple search functions within OSX which did not return this file in the search results for some reason.

请注意,我在 OSX 中使用了多个搜索功能,但由于某种原因没有在搜索结果中返回此文件。

回答by Bernard McMurray

Using Microsoft office 365. Lost Exceland WordMacros during last update. Had an Excel File that I had copied to my laptop (Windows 10) which had not been updated. Brought it up on my desktop. Was able to see modules but no content. Was unable to remove modules. Uninstalled Office 365. After reinstall, was able to see and use macros from that file. Word macro not retrieved. Hope it helps someone.

使用Microsoft office 365. 上次更新期间丢失ExcelWord宏。有一个我已复制到我的笔记本电脑 ( Windows 10)的 Excel 文件,该文件尚未更新。把它带到我的桌面上。能够看到模块但没有内容。无法移除模块。已卸载Office 365。重新安装后,能够查看和使用该文件中的宏。未检索到 Word 宏。希望它可以帮助某人。