PDA

View Full Version : [SOLVED] Got Excel< 2007? Test if "Action Will Reset Project"



SamT
01-26-2017, 01:27 PM
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 (http://www.vbaexpress.com/forum/showthread.php?58385-Excel-custom-data-validation-with-drop-down-list)

ashleyuk1984
01-26-2017, 01:35 PM
Does "Exit Sub" before End Sub have the same effect? Sorry, can't try it myself as I'm not using the same version.

Paul_Hossler
01-26-2017, 01:39 PM
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

SamT
01-26-2017, 02:19 PM
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

ashleyuk1984
01-26-2017, 02:31 PM
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 ?

SamT
01-26-2017, 03:06 PM
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. :banghead: