I have the following code which is designed to show two buttons (save and cancel) when the user finishes editing a spreadsheet object in an Access form.
Private Sub wks1_EndEdit(Accept As Boolean, FinalValue As Variant, Cancel As Variant, ErrorDescription As Variant)
Form_RefAn_UnitData.cmdSaveChg.Visible = True
Form_RefAn_UnitData.cmdCancelChg.Visible = True
End Sub
I have tried replacing the "Variant" text with "Object" and "ByRef". I'm obviously new to this so I'm missing something in the syntax here.
It is described in the documentation as either:
Private Sub Object_EndEdit(ByVal Accept As Boolean, ByVal FinalValue As ByRef, ByVal Cancel As ByRef, ByVal ErrorDescription As ByRef)
or
Event EndEdit(Accept As Boolean, FinalValue As ByRef, Cancel As ByRef, ErrorDescription As ByRef)
Private Sub wks1_EndEdit(Accept As Boolean, FinalValue As Variant, Cancel As Variant, ErrorDescription As Variant)
Form_RefAn_UnitData.cmdSaveChg.Visible = True
Form_RefAn_UnitData.cmdCancelChg.Visible = True
End Sub
I have tried replacing the "Variant" text with "Object" and "ByRef". I'm obviously new to this so I'm missing something in the syntax here.
It is described in the documentation as either:
Private Sub Object_EndEdit(ByVal Accept As Boolean, ByVal FinalValue As ByRef, ByVal Cancel As ByRef, ByVal ErrorDescription As ByRef)
or
Event EndEdit(Accept As Boolean, FinalValue As ByRef, Cancel As ByRef, ErrorDescription As ByRef)