+ Reply to Thread
Results 1 to 5 of 5

How to stop SaveAs command triggering Change_Events?

  1. #1
    Registered User
    Join Date
    01-29-2007
    Posts
    92

    How to stop SaveAs command triggering Change_Events?

    Why does the Save As command trigger certain combobox (active X) change events while the save command does not? It's the kind of dubugging that will drive a guy bonkers because i know whats happening, i just don't know why its happening.

    I attached a simple sheet with one combobox. To see what i'm talking about put a breakpoint in the sub (its in sheet1) and save as the file as another name. (make sure VBE is turned off, it does not trigger if its on)

    Thank you
    Schwizer
    Attached Files Attached Files

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Schwizer, whilst i understand you are fairly new here the title to your thread is unhelpful, i have changed the title to reflect the content. In future please suply a meaningful title or risk your post being deleted!

    Regards,
    Simon

  3. #3
    Registered User
    Join Date
    01-29-2007
    Posts
    92
    My apologies. The old title was not as applicable as the new one.

    I have also discovered part of my problem being that application.xlcalcalculation was set to automatic. This is fine and i need it to be set to automatic while the user is changing data but not when the user save As the workbook. I could use the workbook_beforesave command to set it to manual but this causes other problems.

    What I am hoping for now is a way to check the variable SaveAsUI from a regular change event. So if combobox_change executes i can check to see if SaveAsUI = True and if it is i can just exit sub. But how do i call for the value of this variable (SaveAsUI) outside the workbook_beforesave function?

    Thanks
    Schwizer

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Apology accepted
    i am unclear do you want to prevent SaveAs or just prevent SaveAs if being saved after a combobox change?

    Regards,
    Simon

  5. #5
    Registered User
    Join Date
    01-29-2007
    Posts
    92
    I know its confusing to even myself. I attached a sheet which shows an example and has directions on how to reproduce my problem in 3 steps.

    The sheet is a simplified version of what i am doing so please assume that i need to do things the way i have done them on the sheet. (i.e. using linked cells, having formulas which reference the linked cells, i can't use Data Validation with in-cell dropdowns).

    Sry bout the the complicated post.
    schwizer
    Attached Files Attached Files

+ 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