mamradzelvy
Member
- Local time
- Today, 21:10
- Joined
- Apr 14, 2020
- Messages
- 145
Hello,
I'm trying to understand the Dim statement in vba, however I don't know whether it's the lack of english skills or what, but I just don't understand what it does based on explanations found on support.office.com.
Could anybody explain this to me as you would to a dumb person? (because i apparently am one)
Maybe based on this example, which is what I was trying to grasp in the first place:
I'm trying to understand the Dim statement in vba, however I don't know whether it's the lack of english skills or what, but I just don't understand what it does based on explanations found on support.office.com.
Could anybody explain this to me as you would to a dumb person? (because i apparently am one)
Maybe based on this example, which is what I was trying to grasp in the first place:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim Answer As Integer
If Me.Dirty = True Then
Dim Response As Integer
' Displays a message box with the yes and no options.
Response = MsgBox(Prompt:="Do you wish to save this data?", Buttons:=vbYesNo)
' If statement to check if the yes button was selected.
If Response = vbNo Then
DoCmd.RunCommand acCmdUndo
DoCmd.Close
End If
Else
' The yes button was selected.
DoCmd.Close
Globals.Logging "dbTabule Record Edit"
End If
End Sub