I have some code that sends data from ListBox2.
The code is below
If the user selects data from ListBox1 and presses the cmd button by mistake, they get my msbox MsgBox "Updated" where in fact no data was sent to the spreadsheet.
Can that message box only appear if there is actually data sent.
Private Sub SendingData_Click()
Dim NextCell As Range
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set NextCell = Workbooks("Match.xls").Worksheets("Mapping Table").Range("B" & Rows.Count).End(xlUp).Offset(1)
NextCell.value = ListBox2.value