Problem running macros in Excel filenames containing special characters like []
After reading Dave's response, I see the problem differently. If the
present concern is the brackets in the filename, why not store
"ThisWorkbook.Name" to a string variable and then use string functions
to replace brackets with parenthesis? My snippet becomes
CommandBars("toolbar_name").Co*ntrols("Btn_Name"). OnAction = _
strWorkbookName & "!macro_name"
I haven't tried this but I see no reason why it shouldn't work.
|