Sub Test() Dim pal As Palette Set pal = Palettes.CreateFromSelection("Selection Colors", _ Application.UserDataPath & "Palettes\SelectionColors.xml", True) MsgBox "The selection uses " & pal.ColorCount & " colors" pal.CloseEnd Sub