密码保护并以.xlsm格式保存时,Excel崩溃与大型VBA项目 [英] Excel Crash with Large VBA Project When Password Protected and Saved in .xlsm Format

查看:246
本文介绍了密码保护并以.xlsm格式保存时,Excel崩溃与大型VBA项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在Excel 2013中开发了一个大型的VBA应用程序,并在一个工作簿中提供。每个用户都有一份工作簿副本来存储他们的数据。应用程序在保存之前将其数据序列化为关闭的多个工作表。


当VBA项目时受密码保护,工作簿以
.xls 格式保存,一切按预期工作;保存,关闭和重新打开Excel都能正常工作并维护用户的数据。


当VBA项目 密码保护时,并且工作簿以
xlsm 格式保存,一切都按预期工作;保存,关闭和重新打开Excel都能正常工作并保持用户的数据。


当VBA项目 密码保护时,工作簿保存在$中b $ b xlsm 格式,工作簿将保存并关闭,但是下次打开工作簿时,它将崩溃Excel("Microsoft Excel已停止工作") ;)。


任何人都可以提供解释,或解决与保存带密码保护的VBA项目的.xlsm工作簿相关的特定问题吗?


提前致谢,


Jon

解决方案

您好
Jon Farman,


您曾提到过,"当VBA项目 密码受保护时,工作簿保存在
.xls 格式,一切都好如预期的那样;保存,关闭和重新打开Excel都能正常工作并保持用户的数据。"


您是说您已将VBA代码存储在.XLS文件中吗?你无法在.XLS文件中存储VBA代码。


其他的事情,你打开工作簿时是否运行任何代码?


如果是然后出于测试目的,尝试评论该代码并进行测试。


您的代码可能会导致某些问题。


我也建议您可以在安装了Office 2013的其他计算机上进行测试。


如果有关于Office的任何更新,请尝试安装最新更新并尝试进行测试。


如果您告知我们您当前正在使用的Excel版本,那就更好了。


我们将尝试在我们这边进行测试。


在我这边,我尝试创建一个新的工作簿。我用密码保护它然后我把它保存为.xlsm文件。


然后我关闭它并重新打开它。


它成功打开而不会崩溃。


我用来进行测试的Excel版本。



问候


Deepak


Hi,

I have a large VBA application developed in Excel 2013, and delivered in a single workbook. Each user has a copy of the workbook to store their data. The application serialises its data to a number of worksheets on close, before saving.

When the VBA project is password protected, and the workbook is saved in .xls format, everything works as expected; save, close and reopen of Excel all work correctly and the user's data is maintained.

When the VBA project is not password protected, and the Workbook is saved in .xlsm format, everything works as expected; save, close and reopen of Excel all work correctly and the user's data is maintained.

When the VBA project is password protected, and the Workbook is saved in .xlsm format, the workbook will save and close, however the next time the workbook is opened, it will crash Excel ("Microsoft Excel has stopped working").

Can anyone offer an explanation, or work around for this specific issue related to saving an .xlsm workbook with a password protected VBA project?

Thanks in advance,

Jon

解决方案

Hi Jon Farman,

you had mentioned that,"When the VBA project is password protected, and the workbook is saved in .xls format, everything works as expected; save, close and reopen of Excel all work correctly and the user's data is maintained."

do you mean you had store the VBA code in .XLS file? you can't store VBA code in .XLS file.

other thing , are you running any code when you open the workbook?

if yes then for testing purpose, try to comment that code and make a test.

it is possible that your code causing some issue.

I also suggest you to make a test on other machine which have Office 2013 installed.

if any updates are available regarding Office then try to install the latest updates and try to make a test.

it is better if you inform us the version of Excel you are using currently.

we will try to make a test on our side.

on my side, I try create a new workbook. I protected it with password then I save it as .xlsm file.

then I close it and reopen it.

it opened successfully without getting crashed.

below version of Excel I am using to make a test.

Regards

Deepak


这篇关于密码保护并以.xlsm格式保存时,Excel崩溃与大型VBA项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆