If I put my vba project file "Project" in the c directory, this toobar button macro works just fine objToolbar0.AddToolbarButton 0, "Placer", "Placer", "^C^C & -vbarun c:/Project.dvb!Module2.Placer ;" However, if I place it in c:\Documents and Settings\David.OFFICE\My Documents, and use objToolbar0.AddToolbarButton 0, "Placer", "Placer", "^C^C & -vbarun c:/Documents and Settings/David.OFFICE/My Documents/Project.dvb!Module2.Placer ;" Now it apparently chokes on the spaces in the path (my guess, but I don't know) Any ideas on fixing this? Thanks a lot David
Two solutions... #1: at the -VBARUN prompt, if you put your macro name in quotes, you can use spaces. Use double quotes to get a string containing quotes. Something like: objToolbar0.AddToolbarButton 0, "Placer", "Placer", "^C^C & -vbarun ""c:/Documents and Settings/David.OFFICE/My Documents/Project.dvb!Module2.Placer"" ;" #2: Windows has short filenames associated with each long filename, for use with old programs that didn't like spaces. This should work: objToolbar0.AddToolbarButton 0, "Placer", "Placer", "^C^C & -vbarun c:/DOCUME~1/David.OFFICE/MYDOCU~1/Project.dvb!Module2.Placer ;" James