Problems with VBA User Forms on Excel

vba , user forms , excel Huntsville, United States
  • 12 years ago
    I am working with Microsoft Excel 2003 with VBA 6.5. I have a workbook with multiple sheets. Each sheet has a User Form with buttons that can open other User Forms. For example, I have a Function User Form with a button for doors. When the Door button is pressed, it brings up the Door User Form, which has the option to Open, Stop, or Close. These are very simple User Forms. All they do is either call another User Form or call a Subroutine. The problem is that when I created two new User Forms on this sheet, one opened up and worked fine, but the other one looked as though it had deleted itself. None of the buttons were there, and the formatting had reset. However, the code I had written behind it was still there. I have tried everything that I know to fix the problem. Does anyone have any ideas? I'm not sure what information would be needed in coming to a solution, so if you require additional information let me know. Thank you in advance.
  • 12 years ago
    I have tried what I think you describe and it seems to work OK. I don't understand what you say about "Each sheet has a User form..." because the user forms are not linked to sheets, and I don't understand what you mean by " another User Form..." - is this just showing the form by using in a vba subroutine? How does the first form open? Are the forms modal or non-modal? When one form opens another does the code in the form close itself or does it stay open? Post some code, that would help.

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic