G
Guest
I use the following VBA and it works fine:
Selection.AutoFormat Format:=xlRangeAutoFormatList2, Number:=True, _
Font:=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
However, I would like to have the Format style as a variable - how do I do
it. I tried this and gotten an "AutoFormat method of Range class failed"
error. My statement is:
vList = "List2"
Selection.AutoFormat Format:="xlRangeAutoFormat" & vList, Number:=True, _
Font:=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
Any help is appreciated.
Selection.AutoFormat Format:=xlRangeAutoFormatList2, Number:=True, _
Font:=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
However, I would like to have the Format style as a variable - how do I do
it. I tried this and gotten an "AutoFormat method of Range class failed"
error. My statement is:
vList = "List2"
Selection.AutoFormat Format:="xlRangeAutoFormat" & vList, Number:=True, _
Font:=True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
Any help is appreciated.