Hi all
I have Form with 6 ComboBox:
LeftHeader ; CenterHeader ; RightHeader ; LeftFooter .........
Now i try minimize my code and loop trough the Combobox names and values like this.
I know (ws.PageSetup.a.Name) this part is wrong. But how i can use ComboBox names for the Pagesetup Header and Footer property?
I have Form with 6 ComboBox:
LeftHeader ; CenterHeader ; RightHeader ; LeftFooter .........
Now i try minimize my code and loop trough the Combobox names and values like this.
Code:
For Each ws In Worksheets
For Each a In Controls
If TypeName(a) = "ComboBox" Then
Select Case a.Value
Case "Page"
ws.PageSetup.a.Name = "Page &P"
Case "Page of Pages"
ws.PageSetup.a.Name = "Page &P of &N"
........