A major gripe I have with Microsoft deals with the first commandment. In all of their help files and all of their examples online, they NEVER delcare variables! Look at this example from Excel help on the CommandBarButton Object:
Set c = CommandBars("Custom").Controls(2)
With c
If .Type = msoControlButton Then
If .Style = msoButtonIcon Then
.Style = msoButtonIconAndCaption
Else
.Style = msoButtonIcon
End If
End If
End With
I can't easily use this code. What should I DIM "c" as? (don't get me started on the second commandment). It gets worse when they'll introduce three or four other objects in the example, without declaring them.
I know, I eventually figure it out, but why can't Microsoft practice what they preach? In further keeping with your biblical theme, it reminds me of God telling us not to kill, and then smiting all and sundry who tick him off.
Glad to get that off my chest.
Dave
The key to success is detail to attention.