G
G Lykos
Greetings! Would like to do something along the lines of the following:
Dim o as Object
Dim s as String
Dim i as Integer
s = InputBox ("Target collection?", , "ActiveWorkbook.Styles")
Set o = GetByName(s) ' to be the same as though the line read <Set o =
ActiveWorkbook.Styles>
' to be followed by something like -
Debug.Print s & " has " & i & " items:"
For i = 1 to o.Count
Debug.Print o(i).Name
Next i
Need an Excel object GetByName method. Thanks for any ideas!
George
Dim o as Object
Dim s as String
Dim i as Integer
s = InputBox ("Target collection?", , "ActiveWorkbook.Styles")
Set o = GetByName(s) ' to be the same as though the line read <Set o =
ActiveWorkbook.Styles>
' to be followed by something like -
Debug.Print s & " has " & i & " items:"
For i = 1 to o.Count
Debug.Print o(i).Name
Next i
Need an Excel object GetByName method. Thanks for any ideas!
George