Consulting

Results 1 to 6 of 6

Thread: Got Excel< 2007? Test if "Action Will Reset Project"

  1. #1
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location

    Got Excel< 2007? Test if "Action Will Reset Project"

    As soon as either Worksheet sub Ends, I get a "This Action Will Reset Your Project" Warning.

    Any ideas why. Using Excel XP in Windows XP.

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
      If Not Target.Address = "$D$1" Then Exit Sub
      If Target = "" Then Exit Sub
      Cancel = True
      frmDater.Show
    End Sub
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      If Not Target.Address = "$D$1" Then Exit Sub
      If Not Target = "" Then Exit Sub
     frmDater.Show
    End Sub
    Also see Excel custom data validation with drop down list
    Attached Files Attached Files
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  2. #2
    Does "Exit Sub" before End Sub have the same effect? Sorry, can't try it myself as I'm not using the same version.

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    Seems to work OK for me with Win10 Office 2106

    Maybe something got corrupted in your WB, so make a new empty one and copy/paste the code into the new one, or export the modules from the old and import into the new
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Exit Sub does do the same thing, but try it in your version any way.

    Restarted Excel and rewrote the whole thing from scratch.

    Also tried "Set frmDater = Nothing" with and without the Form's Unload Me code.

    It still happens If I Use the Form's Close button, (the big X,)

    I tested with hardcoded Dates vs Formulas
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #5
    Quote Originally Posted by SamT View Post
    It still happens If I Use the Form's Close button, (the big X,)
    Hmmm, that's odd. If you create a new form - but with no code or controls (just a blank canvas), does it give the same error when you hit the big X ?

  6. #6
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    If you create a new form
    New sheet w] empty form = No problem

    add a Listbox, same problem

    The only code in the book:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    UserForm1.Show
    End Sub
    Hmmmmnnn. . .
    Closed Workbook, used File New >> Workbook, inserted new empty form
    Tested with heet_SelectionChange and Workbook_SheetSelectionChange
    Same Problem

    Closed Excel, repeated test = No problem until I add a control.

    I reckon it's past time to Format C: and reinstall Windows, et al.
    Last edited by SamT; 01-26-2017 at 03:23 PM.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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