How to get text and a variable in a messagebox

前端 未结 5 1129
滥情空心
滥情空心 2021-02-07 15:11

I just need to know how to have plain text and a variable in a messagebox.

For example:

I can do this: MsgBox(variable)

And I can do this: <

5条回答
  •  死守一世寂寞
    2021-02-07 15:37

    I kind of run into the same issue. I wanted my message box to display the message and the vendorcontractexpiration. This is what I did:

    Dim ab As String
    Dim cd As String
    
    ab = "THE CONTRACT FOR THIS VENDOR WILL EXPIRE ON "
    cd = VendorContractExpiration
    
    
    If InvoiceDate >= VendorContractExpiration - 120 And InvoiceDate < VendorContractExpiration Then
    
    MsgBox [ab] & [cd], vbCritical, "WARNING"
    
    End If
    

提交回复
热议问题