简体   繁体   English

用户表单多页不刷新/工作

[英]Userform multipage does not refresh / work

在此处输入图像描述 I'm pulling my hair on this one我在这个上拉我的头发

I'm working on VBA application that consists of few pages on multipage.我正在开发 VBA 应用程序,该应用程序由多页上的几页组成。 I have a list of items on page 0 and when I click on that item, excel then should move to different page.我在第 0 页上有一个项目列表,当我单击该项目时,excel 然后应该移动到不同的页面。 the code I have is:我的代码是:

Userform1.MultiPage1.Value = 1

This however does not happen.然而,这不会发生。 I mean the page 1 is not shown even though it is selected (tab on top of the multipage is selected).我的意思是即使选择了第 1 页(选择了多页顶部的选项卡),也不会显示第 1 页。

I have quite a bit of code prior to above shown code and everything seems to be working fine.在上面显示的代码之前,我有很多代码,一切似乎都运行良好。

I have read on google that the problem could be due to declaring the same variable more than once.我在谷歌上读到这个问题可能是由于多次声明同一个变量。 Code checked and looks ok now.代码检查,现在看起来不错。

I also read that the form can be corrupted.我还读到表格可能已损坏。 I hope it isn't because there is a lot of stuff on it.我希望不是因为上面有很多东西。

Dear brothers.亲爱的兄弟们。 Do you have any idea why the multipage doesn't change the page and how to fix it.您是否知道为什么多页不会更改页面以及如何修复它。

This is very important to me because I have to show working draft tomorrow at work:/这对我来说非常重要,因为我明天必须在工作中展示工作草稿:/

Thank you in advance.先感谢您。

On attached picture you can see that the multipage has changed from 'page1' to 'video_exhibit', however it did not update the view.在所附图片上,您可以看到多页已从“page1”更改为“video_exhibit”,但它没有更新视图。 just stayed on the same page.只是停留在同一页面上。 Multipage was working fine prior to this stage of the application.在应用程序的这个阶段之前,Multipage 工作正常。

I hope admins are ok with it.我希望管理员可以接受。 I shared the files on google drive at https://drive.google.com/drive/folders/12LTuaMoQ-HpI1z8g9F2419dHvHQU4f_4?usp=sharing uploaded are: rar, zip and exports from app.我在https://drive.google.com/drive/folders/12LTuaMoQ-HpI1z8g9F2419dHvHQU4f_4?usp=sharing 分享了谷歌驱动器上的文件:rar,zip 和从 app 导出。 userform and modules.用户窗体和模块。 If anyone can help I'm willing to pay £10 for given charity.如果有人可以提供帮助,我愿意为给定的慈善机构支付 10 英镑。 I guess paying someone directly isn't allowed.我想直接付钱给别人是不允许的。 I just need this problem fixed.我只需要解决这个问题。 I'm aware there is lots to fix and unnecessary loops, but this can wait as I just need a draft working.我知道有很多需要修复和不必要的循环,但这可以等待,因为我只需要一个草稿工作。 Once again, thank you再次感谢您

Thank you for your help.谢谢您的帮助。

So, after spending whole night trying to fix it, I decided to create new Userform and copy all the stuff on it.因此,在花了一整夜试图修复它之后,我决定创建新的用户表单并复制上面的所有内容。 It works!有用!

I've asked if the problem could be due to file being corrupted and it looks like this was the reason.我问过问题是否可能是由于文件损坏,看起来这就是原因。 Userform1 was behaving strangely and I could not understand it. Userform1 的行为很奇怪,我无法理解。

So unless someone will find different reason for the bug, the official version is - Userform1 was corrupted.因此,除非有人会找到不同的错误原因,否则官方版本是 - Userform1 已损坏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM