OK, then add a text box to the aforementioned userform and modify the code associated with the OK button as follows:
Code:
Private Sub btnOK_Click()
Dim bSelected As Boolean
Dim i As Long
With Me
If .TextBox1.Text = "" Then
MsgBox "Enter the title"
.TextBox1.SetFocus
GoTo lbl_Exit
End If
For i = 0 To .ListBox1.ListCount - 1
If .ListBox1.Selected(i) Then
bSelected = True
Exit For
End If
Next i
If Not bSelected Then
MsgBox "Select at least one item from the list"
.ListBox1.SetFocus
GoTo lbl_Exit
End If
.Hide
.Tag = 1
End With
lbl_Exit:
Exit Sub
End Sub
The modify the names of each of your macros to enable the title from the text box to be passed e.g.
Code:
Sub Add_Att1(strTitle As String)
and then replace Title in your code with strTitle e.g.
Code:
Selection.TypeText Text:="Attachment 1 – " & strTitle
That will then insert the selected title where indicated. If your macros worked correctly before, then they should do so with the addition of the titles entered.