Oliver Dewar
Board Regular
- Joined
- Apr 17, 2011
- Messages
- 201
Hi, first post and first attempt at in depth excel programming (so go easy on me!).
Here's a simplified version of what's going on for me.
I have a modal userform (modal1). If I click on a button the userform is hidden and a modeless userform (modeless1) is shown (modeless1.show False).
This modeless userform allows the user to search for and select a record on another sheet from which a lot of data will be used. Once the record has been selected the user presses a button on modeless1 and the data is copied to the original sheet, modeless1 is unloaded (modeless1.unload), the original sheet is selected and the original modal userform is shown (modal1.show) with the new info in it.
This works brilliantly... but it only works once. (and here's my problem).
If the user realises they selected the wrong record when using modeless1 and tries to go back to modeless1 to correct it by clicking on the same button on modal1... modal1 hides and then modeless1 does not appear (even though VBA shows that macros are still being run).
Is there a way to show modeless1 again? I tried hiding it instead of unloading it but it did exactly the same thing.
All help will be greatly appreciated.
Regards,
Oliver
Here's a simplified version of what's going on for me.
I have a modal userform (modal1). If I click on a button the userform is hidden and a modeless userform (modeless1) is shown (modeless1.show False).
This modeless userform allows the user to search for and select a record on another sheet from which a lot of data will be used. Once the record has been selected the user presses a button on modeless1 and the data is copied to the original sheet, modeless1 is unloaded (modeless1.unload), the original sheet is selected and the original modal userform is shown (modal1.show) with the new info in it.
This works brilliantly... but it only works once. (and here's my problem).
If the user realises they selected the wrong record when using modeless1 and tries to go back to modeless1 to correct it by clicking on the same button on modal1... modal1 hides and then modeless1 does not appear (even though VBA shows that macros are still being run).
Is there a way to show modeless1 again? I tried hiding it instead of unloading it but it did exactly the same thing.
All help will be greatly appreciated.
Regards,
Oliver