无法重命名UserForm(到“旧”名称) [英] Can't rename an UserForm (to "old" name)
本文介绍了无法重命名UserForm(到“旧”名称)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在VBA Excel 2016中,我无法将UserForm重命名为name,之前已将其分配给另一个表单。
In VBA Excel 2016 I can't rename UserForm to name, which had been previously assigned to another form.
例如,4个简单步骤:
- > Forms执行"Insert UserForms"" :再次创建'UserForms 1'
- p.1:现在从上下文创建'UserForms 2'
- 菜单(在项目窗口中的UserForms 1 上)执行"删除用户窗体 1 " :表单已删除
- 在"属性"窗口中尝试重命名 'UserForms2'到'UserForms 1 '( 目前缺席) - 我
CAN not 来做这个!
- in Project->Forms execute "Insert UserForms" : is created 'UserForms1'
- once more p.1 : now is created 'UserForms2'
- from context menu (on UserForms1 in Projects window) execute "Remove UserForm1" : form is removed
- in Properties window try rename 'UserForms2' to 'UserForms1' (which is currently absent)- and I CAN'T to do this !
为什么?删除后,"UserForms1"这个名字是否仍然存在? - 哪里?为什么VBA写入"路径/文件访问错误"在尝试之后?
For why? Was the name 'UserForms1' persisted somewhere after deleting? - where? why VBA writes "Path/File access error" after attemption?
如何设置这个名称:'UserForms1'
What shall I do to set exactly this name: 'UserForms1'
谢谢
PS我尝试从VBA以编程方式执行类似的操作,但它在任何情况下都不起作用...
PS I try to do similar things programmatically from VBA, but it does not work in any cases...
推荐答案
UserForm1仍存在于工作簿的已保存版本中。保存工作簿。然后应该可以再次将UserForm2重命名为UserForm1。
UserForm1 still exists in the saved version of the workbook. Save the workbook. It should then be possible to rename UserForm2 to UserForm1 again.
这篇关于无法重命名UserForm(到“旧”名称)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文