Can't see what the problem is here, but if the Form is closed, then Excel is closed you get a wait cursor forever.
But if the Form is not closed first, Excel closed normally. Any help finding why is appreciated
Can't see what the problem is here, but if the Form is closed, then Excel is closed you get a wait cursor forever.
But if the Form is not closed first, Excel closed normally. Any help finding why is appreciated
Not sure exactly what's happening but then again I'm not sure why you are referencing the userform in the class clsPressBtn and in it's own Initialize event.
Try changing the Initialize event to this,
and the code in clsPressBtn to this.![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
If posting code please use code tags, see here.
Administrative Note:
Welcome to the forum
We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums.
Read this to understand why we (and other sites like us) consider this to be important.
As you are new here, I shall provide the requisite link for you this time: https://www.mrexcel.com/forum/excel-...not-close.html
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Hey Norie, that's done it! I didn't write that and can't remember where I got it, and didn't realise
the problem until just recently when re-doing some stuff. There's also another msg on teh otehr forum where I was
looking at a routine (to maybe replace this with). Won't need it now, but still be interested why it wouldn't work.
In the meantime I wrote 48 click events which I can now remove. Many thanks indeed.
One other thing, if I pass a control to a Function, within that funcrion can I use its Enter, Exit and keypress events ? At the moment
I'm duplicating 11 of those.
Hi Ali, I get it... no worries, was mainly I could upload the attachment here and it had been 24+ and no answers... figured it'd stay that way.
This had bogged me down for several days so great to have a solution.
If you pass a control to a function you can't use it's events.
What are you trying to do when you pass a controls to the function?
Understood Norie... ta... What i want to do with each one is
I have added/repeated the textbox events individually (there's 11 of them) so maybe that's as good as is needed?![]()
Please Login or Register to view this content.
Are trying to do this in a class module, as you did for buttons previously?
Hi Norie, no all that is at Form module level.
Buttons still working great after you fix... I was given that button routine/class and just used it verbatim without realising it caused a problem. That only became
obvious as I rewrote some routines as I learned more about coding. Which doesn't sound right, but is how it is LOL.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks