Hi, I am trying to set up a letter in Word 2010 (Windows 8) and part of the form I have used a list box (Lenders) with multiple selections and I am trying to put this in a bookmark in the word document. When I try to run the program I am receiving the above error message. Can you please advise what is causing this error?
Error message is occurring on this line - .Bookmarks("Lenders").Range.Text = ListBox1
Option Explicit
Private Sub Address_Change()
End Sub
Private Sub CommandButton1_Click()
Address.Value = Null
ListBox3.Value = Null
TextBox1.Value = Null
TextBox2.Value = Null
TextBox3.Value = Null
TextBox4.Value = Null
TextBox5.Value = Null
End Sub
Private Sub CommandButton2_Click()
With ActiveDocument
.Bookmarks("Address").Range.Text = Address.Value
.Bookmarks("Business").Range.Text = TextBox2.Value
.Bo
.Bookmarks("Name").Range.Text = TextBox3.Value
.Bookmarks("Recipient").Range.Text = TextBox1.Value
.Bookmarks("Title").Range.Text = TextBox4.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Private Sub CommandButton3_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
Private Sub Label1_Click()
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub ListBox3_Click()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub TextBox2_Change()
End Sub
Private Sub TextBox4_Change()
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
CommandButton2.Value = True
With ListBox1
.AddItem "Adelaide Bank"
.AddItem "ANZ"
.AddItem "Australian First Mortgage"
.AddItem "Bank of Melbourne"
.AddItem "Bank West"
.AddItem "CBA"
.AddItem "ING Direct"
.AddItem "LaTrobe Financial"
.AddItem "Liberty"
.AddItem "NAB"
.AddItem "St George"
.AddItem "Westpac"
End With
End Sub
Form.jpg
Please let me know if you need any further information.
Thank you