I find myself banging my head against the wall trying to copy a CommandBar from one db to another in code. I am opening the other db as a New Access.Object and I've tried various versions of the widely suggested (also on MSDN) code
For Each cbrCtl In cbrOriginal.Controls
I have MS Office Object Library 9.0 enabled in the file I'm trying to copy from and I've tried en/disabling it in the file I'm copying to, but with no luck.
on the .Copy line a keep getting the error message "Invalid procedure call or argument". However, everything works fine when I copy the toolbar withing the same db (which doesn't have much practical value :-( )
I'm getting pretty hopeless here, so any help will be greatly appreciated!!
I'll have to work on the code suggested by shamil (it must be adjusted a bit) as I'm making an update tool to update a number of external .mdb files, so manual copying wouldn't be an appreciated option :-(
I was hoping there would be a lighter solution to this problem, but on the other hand it would be great to have just anything that works! ;-)