I am trying to display a userform that I have designed when the Yes button is selected but I keep getting the error message 'Run-time error '438': Object doesn't support this property or method'.
He is my code:
Private Sub cbSuppliersInv_AfterUpdate()
If cbSuppliersInv.Enabled Then
If cbSuppliersInv.Value = True Then
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to update supplier's invoice details?"
Style = vbYesNo + vbInformation + vbDefaultButton2
Title = "Please Confirm"
Help = "DEMO.HLP"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
Else ' User chose No.
MyString = "No" ' Perform some action.
Worksheets("STERLING TRADED DETAILS").Select
When I debug the code 'frmSuppliersInv.Show' is highlighted in yellow. Can anyone help me please?