S
sue.hunter
How would this code be written using the Select Case Statement? I
don't know how to handle the portion after "Then". I'm assuming the
Select Case Statement would be a better choice?
Thanks,
Sue
If ListBox1.Value = "QBE (all pillars)" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoQBE").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Agri" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoAgri").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Farmers Union" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoFUI").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "General Casualty" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("atLogoGC").Insert
_
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "North Pointe" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("atLogoNP").Insert
_
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Unigard" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoUIC").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
End If
don't know how to handle the portion after "Then". I'm assuming the
Select Case Statement would be a better choice?
Thanks,
Sue
If ListBox1.Value = "QBE (all pillars)" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoQBE").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Agri" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoAgri").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Farmers Union" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoFUI").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "General Casualty" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("atLogoGC").Insert
_
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "North Pointe" Then
ActiveDocument.AttachedTemplate.AutoTextEntries("atLogoNP").Insert
_
Where:=.Bookmarks("bmLogo").Range, RichText:=True
ElseIf ListBox1.Value = "Unigard" Then
ActiveDocument.AttachedTemplate.AutoTextEntries
("atLogoUIC").Insert _
Where:=.Bookmarks("bmLogo").Range, RichText:=True
End If