ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Runtime Error 5281 (https://www.excelbanter.com/excel-programming/384738-runtime-error-5281-a.html)

susiecc via OfficeKB.com

Runtime Error 5281
 
I'm getting a randome Runtime Error #5281 when I run a macro that creates a
paragraph style in a document. The error says something like the style I'm
trying to create is based on too many styles.

The funny thing about this is that if I quit out of Word and load the macro
again, it doesn't necessarily happen.

I've created 120 style macros. When a user activates a User Form through a
command bar, a selection of buttons are available to apply style to text. You
highlight the text and then click a button. It checks to see whether the
style is already created and if it isn't it creates the style, then applies
it to the selected text.

It was very odd. It was working fine yesterday. Then, when I created a few
more style macros, it suddenly started giving me the error. After closing and
opening the project template, it then allowed me to cycle through all the
macros with no error.

I don't know what is going on. I couldn't even find the error when I checked
with Microsoft.

Help

sue

--
Sue Caulfield

Message posted via http://www.officekb.com


merjet

Runtime Error 5281
 
You'd likely get a better response at a newsgroup for Word macros,
e.g.:
microsoft.public.word.vba.general
microsoft.public.word.word6-7macros

Merjet





All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com