I'm looking for VBA that if the person selects yes, the information that was in the message box will be pasted into another sheet that is created. A1 will say "Type" B1 will say "name", A2 and down will have the information from sheet1.Range("b" & VNR). B2 and down will have the information from sheet1.Range("c" & VNR). That's the part I can't figure out, I also might be thinking about it the wrong way too. It's just an OK message now, but it'll be changed to Yes and No. Thank you in advance for your assistance.
VBA Code:
Sub Show_MSGBOX()
Dim vN As Long
Dim VNR As Long
Dim vMsg As String
vN = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
If Sheets("Sheet2").Range("AU10").Value = 0 Then
For VNR = 3 To Sheets("Sheet2").Range("AV10").Value
If Sheets("Leg").Range("H" & VNR).Value = "Leg" Then
vMsg = vMsg & Sheets("Sheet1").Range("B" & VNR) & vbTab & Sheets("Sheet1").Range("C" & VNR) & vbCrLf
End If
Next VNR
MsgBox ("Missing Count: " & Sheets("Sheet2").Range("AU10").Value & vbCrLf & vbCrLf & "Type" & vbTab & " Name" & vbCrLf & vMsg)
Else
For VNR = 3 To Sheets("Dashboard").Range("AV10").Value
If Sheets("Leg").Range("H" & VNR).Value = "Leg" Then
vMsg = vMsg & Sheets("Sheet1").Range("B" & VNR) & vbTab & Sheets("Sheet1").Range("C" & VNR) & vbCrLf
End If
Next VNR
MsgBox ("Missing Count: " & Sheets("Sheet2").Range("AU10").Value & vbCrLf & vbCrLf & "Type" & vbTab & " Name" & vbCrLf & vMsg & vbCrLf & vbCrLf & "** Please Select By name to view all personnel. **")
End If
End Sub