Hi all,
I am just wondering if there is a way to allow a macro to continue running in the background once a userform has been displayed? I have disapled the 'close' button and the last action of the macro is to re-enable it.
Thanks muchly
Hi all,
I am just wondering if there is a way to allow a macro to continue running in the background once a userform has been displayed? I have disapled the 'close' button and the last action of the macro is to re-enable it.
Thanks muchly
Yes, you can show the userform modelessly by specifying False as the argument to the Show method. For example:
Please Login or Register to view this content.
Remember what the dormouse said
Feed your head
Sorry Romper, I dont understand where or how I would use that at all?
Below is the code I currently use, the idea being 'InformationBox' is shown to let the user know that something is actually happening, and then the macro runs on it's jolly way until the end, at which point the button for the user to close the form is activated. I'm sure you are probably with me, but not sure how to use your example in conjunction with the below?
Thanks again.Please Login or Register to view this content.
Last edited by duckboy1981; 07-07-2009 at 11:10 AM.
Change:
to:Please Login or Register to view this content.
basically.Please Login or Register to view this content.
duckboy,
Please edit your post to add code tags.
Entia non sunt multiplicanda sine necessitate
Just tried that but it throws up an error - Run-time error '401' - 'Can't show non-model form when a model form is displayed'
I'm assuming that is because I have another form up infront of that one? Is there anyway around it at all without setting the other form to False?
Couple of options:
1. Hide the other form
2. Show your second form modally and have it actually run the rest of your code when it activates, rather than having the code in run from the calling routine.
Ok, I'll have a play then and figure out the best way of doing it.
Thanks muchly.
Sorry to be annoying...
One last query - now that the form is modeless, it will not allow me to close it using the button on the form and this code -
Is that because it is modeless and is and inherint part of running a modeless form or is there some other factor causing it? This button was allowing me to close the form before hand, and then the code would run.Please Login or Register to view this content.
Thanks again.
That code should be fine. Are you sure your other code is not still running?
There is another form running behind it, if that would cause it to not work, but the macro is totally finished. I have changed it to InformationBox.Hide now and that works, so I will stick with that!
Thanks for the help.
Hi there,
I have a similar problem.
When the form is displayed, I want that a code which verifies if the return button is pressed runs continuously.
I have a login form and after fill the name and password fields, the user hit return and the go button is pressed too.
Any suggestions?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks