CommandBars.FindControl needs an ID, but i do not get an ID for names that do not exist. So I cannot check if FindControl returns Nothing, because if the name does not exist, I get no ID and the script stops.
It would be enough to check if an ID exists, like
CommandBar.Control("name").ID=1843 if it exists
or
CommandBar.Control("name").ID=0/Nothing/etc.if it does not exist
|