I have a simple bit of code.
All it’s doing is checking a check box for a tick if it has one then insert a bookmark from a file see below.
My question is the structure. Yes this works can you do it in a better way? I’m sure you can
Private Sub CommandButton1_Click()
Select Case testing
Case CheckBox1 = False
Selection.InsertFile FileName:="test list.docx", Range:="test1", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Select
Select Case testing2
Case CheckBox2 = False
Selection.InsertFile FileName:="test list.docx", Range:="test2", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Select
End Sub
Thank you in advance
Paul
All it’s doing is checking a check box for a tick if it has one then insert a bookmark from a file see below.
My question is the structure. Yes this works can you do it in a better way? I’m sure you can
Private Sub CommandButton1_Click()
Select Case testing
Case CheckBox1 = False
Selection.InsertFile FileName:="test list.docx", Range:="test1", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Select
Select Case testing2
Case CheckBox2 = False
Selection.InsertFile FileName:="test list.docx", Range:="test2", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Select
End Sub
Thank you in advance
Paul