K
Kent Tessman
I am trying to get something working on Mac Word/VBA that works properly (I
think) on Windows.
I've distilled it down into:
http://www.generalcoffee.com/temp/macrotest.dot
The gist is this:
Upon opening, the document will either use the existing "My Formatting
Toolbar" (InitMyFormattingToolbar) or create a new one if none exists
(CreateMyFormattingToolbar). The important thing is to set style_combo to
the sole CommandBarComboBox on the toolbar. Changes to the toolbar and
combobox should be saved in the document, not the template.
From the document, Ctrl+T (bound to the macro TestDialog) should bring up
the simple dialog UserForm1. Clicking on the only button should run the
button's action routine which (a) adds an item to the style_combo combobox
on the custom toolbar, and (b) prints the combobox's .ListCount property to
the immediate debug window.
Now, the problem is that, for me, at least, (a) works fine, and the item
gets added to the combobox, but (b) fails with the message:
"Method 'ListCount' of object 'CommandBarComboBox' failed"
Note that this only happens (again, for me) on the Mac; it works fine in
Windows.
Any suggestions?
think) on Windows.
I've distilled it down into:
http://www.generalcoffee.com/temp/macrotest.dot
The gist is this:
Upon opening, the document will either use the existing "My Formatting
Toolbar" (InitMyFormattingToolbar) or create a new one if none exists
(CreateMyFormattingToolbar). The important thing is to set style_combo to
the sole CommandBarComboBox on the toolbar. Changes to the toolbar and
combobox should be saved in the document, not the template.
From the document, Ctrl+T (bound to the macro TestDialog) should bring up
the simple dialog UserForm1. Clicking on the only button should run the
button's action routine which (a) adds an item to the style_combo combobox
on the custom toolbar, and (b) prints the combobox's .ListCount property to
the immediate debug window.
Now, the problem is that, for me, at least, (a) works fine, and the item
gets added to the combobox, but (b) fails with the message:
"Method 'ListCount' of object 'CommandBarComboBox' failed"
Note that this only happens (again, for me) on the Mac; it works fine in
Windows.
Any suggestions?