+ Reply to Thread
Results 1 to 15 of 15

Call combobox_change function on exit.

  1. #1
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Call combobox_change function on exit.

    Hi!

    I've got a problem. I'm using an activex combobox in excel. It display 4 posible choices, and one of them is "Other". When someone select "other" there is a textbox named "tb" that should be filled. Otherwise tb should be invisible. Combobox change() function looks like that:

    Please Login or Register  to view this content.
    Apears when I try to close excel - there is a question if I want to save changes and when I answers "Yes" it - somehow - call combobox7_change() function. In that moment textbox "tb" doesn'y exist, so there is an error message

    Please Login or Register  to view this content.
    Could anyone help me, please? What I'm doing wrong?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,237

    Re: Calling combobox_change function on exit.

    Hi,
    Do you have any workbook macros?

  3. #3
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    Yeah, but I belive they shouldn't make diference. There is only Open() - initialisations of all comboboxes only.

    Precisely:
    Please Login or Register  to view this content.
    Last edited by hubert_ii; 12-22-2009 at 09:23 AM.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,237

    Re: Calling combobox_change function on exit.

    You may have to supply a sample workbook that shows the error.

  5. #5
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    Ok - i've send you an email.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Calling combobox_change function on exit.

    Is your combobox linked directly to cells on a worksheet?
    Remember what the dormouse said
    Feed your head

  7. #7
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    No - it's created in a workbook section as you can see over that post. It "comunicates" only whith that "TB" textbox in a change() function.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,114

    Re: Calling combobox_change function on exit.

    The attached works for me using your code.

    One difference I noticed is that for me the Change event is a private sub.
    Yours is Public, did you create that yourself in a standard code model?
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  9. #9
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    Hi!

    Unfortunately I experience same problem with that project, that you have attached. When I open the file, change something and then i try to close file, there very same alert appears...

    Below you could find short screencast.
    http://www.speedyshare.com/files/199...0170524844.avi

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,114

    Re: Calling combobox_change function on exit.

    so is the textbox named tb?

    As already requested, post your example file.

  11. #11
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    I've send it to you in a private message.

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,114

    Re: Calling combobox_change function on exit.

    Your file works as expected.

    Open you file and go to the VBE. Try compiling the project.

    Menu, debug > Compile project. Do you get error message?

  13. #13
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    No - in fact I don't get any message. Compilation didn't solve the problem either...

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,114

    Re: Calling combobox_change function on exit.

    Hard to know what the problem is then as both test files work for me.
    And for you the file does not report error when compiling but then stops reporting error on close.

  15. #15
    Registered User
    Join Date
    12-22-2009
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Calling combobox_change function on exit.

    Ok - thanks for trying. It must be something with my environment then...
    Probably I work it somehow out.

    Thanks a lot and Marry Holly Days!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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