Emperor
01-18-2010, 05:30 AM
Dear VBA-guru's,
I am looking for a way to shorten the next code, this is only a small part from the real code:
If TextBox3.Value = 11 Then
Selection.InsertFile FileName:="11.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 12 Then
Selection.InsertFile FileName:="12.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 13 Then
Selection.InsertFile FileName:="13.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 14 Then
Selection.InsertFile FileName:="14.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
Thnx in advance
Emperor
I am looking for a way to shorten the next code, this is only a small part from the real code:
If TextBox3.Value = 11 Then
Selection.InsertFile FileName:="11.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 12 Then
Selection.InsertFile FileName:="12.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 13 Then
Selection.InsertFile FileName:="13.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
If TextBox3.Value = 14 Then
Selection.InsertFile FileName:="14.doc", Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
End If
Thnx in advance
Emperor