B
Bobby
Hello community,
I worte the following code:
------------------------------------
Private Sub ListBox1_Click()
Dim WriteHere As Range
Set WriteHere = ActiveDocument.Paragraphs(2).Range
WriteHere.InsertAfter UserForm1.ListBox1.Value
Set WriteHere = Nothing
End Sub
Private Sub UserForm_Initialize()
UserForm1.ListBox1.AddItem "ACHAT"
UserForm1.ListBox1.AddItem "VENTE"
UserForm1.ListBox1.AddItem "MODIFICATION"
UserForm1.ListBox1.AddItem "SUPPRESSION" '
UserForm1.Show
Unload Me ' referme la boîte contenant ListBox1
End Sub
----------------------------------
1. The Listbox will not close
2, I get the following message:
Run-Time error 91
Object variable or With block not set
Any help will be appreciated!
Thank's ahead
I worte the following code:
------------------------------------
Private Sub ListBox1_Click()
Dim WriteHere As Range
Set WriteHere = ActiveDocument.Paragraphs(2).Range
WriteHere.InsertAfter UserForm1.ListBox1.Value
Set WriteHere = Nothing
End Sub
Private Sub UserForm_Initialize()
UserForm1.ListBox1.AddItem "ACHAT"
UserForm1.ListBox1.AddItem "VENTE"
UserForm1.ListBox1.AddItem "MODIFICATION"
UserForm1.ListBox1.AddItem "SUPPRESSION" '
UserForm1.Show
Unload Me ' referme la boîte contenant ListBox1
End Sub
----------------------------------
1. The Listbox will not close
2, I get the following message:
Run-Time error 91
Object variable or With block not set
Any help will be appreciated!
Thank's ahead