VBA - Save Code
I got a problem, not a very big problem but a problem.
I have this code....
And I want it to only save wend a msgbox shows up with a YES or NO choice.
Private Sub Form_CommandBeforeExecute(ByVal Command As Variant, ByVal Cancel As Object)
Dim anser As Integer
Dim question As string
question = "Do you want to save?"
anser = MsgBox("Do you want to save?", vbYesNo)
If anser = vbYes Then
Cancel.Value = True
Cancel.Value = False
If you didnt get the questio say something and I will try to explain
in a diferent way.
If you want to save if they say Yes, why are you canceling?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
By mr_sav in forum VB Classic
Last Post: 11-25-2007, 05:48 AM
By Michael Culley in forum .NET
Last Post: 05-10-2002, 01:06 PM
Last Post: 04-03-2002, 07:41 PM
By Helson in forum VB Classic
Last Post: 03-30-2002, 03:46 PM
By Danny Bowman in forum .NET
Last Post: 09-13-2001, 08:23 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center