+ Reply to Thread
Results 1 to 4 of 4

Err 1004 from VBA Charts

  1. #1
    ch
    Guest

    Err 1004 from VBA Charts

    Dear gurus,

    I have a VBA program and one of the command is :

    Charts.Add

    This works fine for some spreadsheets. On other sheets, on different
    workbook, VBA gives error message :


    "Run Time Error - '1004' :

    No more new fonts may be applied in this workbook."


    What's wrong ? What can I do to overcome this error. I do not need any new
    fonts. I just want to create the charts with any fonts available.

    Thanks.

  2. #2
    Robin Hammond
    Guest

    Re: Err 1004 from VBA Charts

    There used to be something on MSDN about this but I can't find it.

    So, from memory.
    Each chart takes minimum 2 fonts.
    Max font limit is 256.
    Implied max chart limit is effectively 128.
    To reduce font usage set Autoscale Fonts to false for each chart.

    The problem was particularly bad in Office 97. I think they may have
    increased the font usage limit since then.

    Robin Hammond
    www.enhanceddatasystems.com

    "ch" <ch@discussions.microsoft.com> wrote in message
    news:5F21131B-4CAD-4A6C-97DE-E0C53AC45084@microsoft.com...
    > Dear gurus,
    >
    > I have a VBA program and one of the command is :
    >
    > Charts.Add
    >
    > This works fine for some spreadsheets. On other sheets, on different
    > workbook, VBA gives error message :
    >
    >
    > "Run Time Error - '1004' :
    >
    > No more new fonts may be applied in this workbook."
    >
    >
    > What's wrong ? What can I do to overcome this error. I do not need any
    > new
    > fonts. I just want to create the charts with any fonts available.
    >
    > Thanks.




  3. #3
    ch
    Guest

    Re: Err 1004 from VBA Charts

    I turn off all the "auto scale" option in the "Format Chart Area- Fonts" and
    still get the same message.

    Is there something else I can try ?

  4. #4
    Robin Hammond
    Guest

    Re: Err 1004 from VBA Charts

    Not really.

    You could try remapping any styles that use non-standard fonts in your
    workbook to reduce your other fonts. See the style mapper on my site as a
    quick way to do this. Whatever you do though, the charts will take up fonts.

    Otherwise, what version of excel, and how many charts are you talking about.

    Robin Hammond
    www.enhanceddatasystems.com

    "ch" <ch@discussions.microsoft.com> wrote in message
    news:AC803976-0414-4B14-B2CB-CCC296BE483A@microsoft.com...
    >I turn off all the "auto scale" option in the "Format Chart Area- Fonts"
    >and
    > still get the same message.
    >
    > Is there something else I can try ?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1