+ Reply to Thread
Results 1 to 8 of 8

Code Picker

  1. #1
    Registered User
    Join Date
    01-11-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    25

    Code Picker

    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
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code Picker

    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,
    Please Login or Register  to view this content.
    and the code in clsPressBtn to this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Code Picker

    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    01-11-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Code Picker

    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.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code Picker

    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?

  6. #6
    Registered User
    Join Date
    01-11-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Code Picker

    Understood Norie... ta... What i want to do with each one is

    Please Login or Register  to view this content.
    I have added/repeated the textbox events individually (there's 11 of them) so maybe that's as good as is needed?

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code Picker

    Are trying to do this in a class module, as you did for buttons previously?

  8. #8
    Registered User
    Join Date
    01-11-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Code Picker

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Executing code after date is chaged with date picker?
    By RustyNail in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2019, 12:23 PM
  2. Replies: 8
    Last Post: 03-08-2017, 11:00 PM
  3. [SOLVED] file-picker thinks it is a folder-picker if the folder picker runs first?
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-01-2016, 01:14 PM
  4. code won't display a selected image from a file picker, in a user form Any ideas?
    By jakeembx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-09-2014, 02:47 PM
  5. vetting of my code, and edit date picker on my form
    By omolemo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2013, 10:02 AM
  6. [SOLVED] DT Picker
    By Alex Martinez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2005, 08:06 AM
  7. [SOLVED] DT Picker
    By Alex Martinez in forum Excel General
    Replies: 1
    Last Post: 05-13-2005, 06:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1