Fonts get size 1 and can't be changed after a procedure - even by excel GUI!!

Hi,

I have been using code to loop for each chtobj in a worksheet to set font 
size right etc.

Sometimes an error occur and the size become 1 pt. I can live with that once 
or so, but I can't change the FONT BACK neither with code nor from excel 
chart GUI. No code are running in background during this of cource, I try 
even to change the font from Excel GUI with macro switched off. It can only 
be solved with building a new chartobject...

Have any of you got this error, any knowing why it occure and what I can do 
about it?

I thougt it was because some of the charts had no values or some refere to 
empty cells, but now, after some hours fixing this, the probelm still come 
to me....

Please tell me!

For the interested:
The procedure I ran is an ordinary kind of:

LIKE:
    Dim scol As Series
    Dim dl As DataLabel
        For Each scol In chtobj.Chart.SeriesCollection
            For Each dl In scol.datalabels
                With dl.Font
                    .Name = "Arial"
                    .FontStyle = "Fet"
                    .Size = 8
                    .Strikethrough = False
                    .Superscript = False
                    .Subscript = False
                    .OutlineFont = False
                    .Shadow = False
                    .Underline = xlUnderlineStyleNone
                    .ColorIndex = xlAutomatic
                    .Background = xlAutomatic
                End With
                With dl
                    .NumberFormat = "#,##0"
                    .AutoScaleFont = True
                End With
            Next
        Next

OR

    'chtobj.Chart.Legend.AutoScaleFont = True
        With chtobj.Chart.Legend.Font
            .Name = "Arial"
            .FontStyle = "Normal"
            .Size = 8
            .Strikethrough = False
            .Superscript = False
            .Subscript = False
            .OutlineFont = False
            .Shadow = False
            .Underline = xlUnderlineStyleNone
            .ColorIndex = xlAutomatic
            .Background = xlAutomatic
        End With
    chtobj.Chart.Legend.Position = xlBottom



Regards 


0
Not3496 (13)
12/5/2004 11:47:56 PM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
827 Views

Similar Articles

[PageSpeed] 19

I just found that if I deactivate the autosize function it work again. And 
if I try to activate the autosize again, i get a error message "there is not 
allowed with more fonts in the sheet" or something.

I know I have read something about autosize funktion combined with many 
chartobjects. Any knowing if I can get rid of the probelms if I just set 
font autosize function to false instead in the code?

Regards


"Marie J-son" <Not@email.com> skrev i meddelandet 
news:uVNmiSy2EHA.3000@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> I have been using code to loop for each chtobj in a worksheet to set font 
> size right etc.
>
> Sometimes an error occur and the size become 1 pt. I can live with that 
> once or so, but I can't change the FONT BACK neither with code nor from 
> excel chart GUI. No code are running in background during this of cource, 
> I try even to change the font from Excel GUI with macro switched off. It 
> can only be solved with building a new chartobject...
>
> Have any of you got this error, any knowing why it occure and what I can 
> do about it?
>
> I thougt it was because some of the charts had no values or some refere to 
> empty cells, but now, after some hours fixing this, the probelm still come 
> to me....
>
> Please tell me!
>
> For the interested:
> The procedure I ran is an ordinary kind of:
>
> LIKE:
>    Dim scol As Series
>    Dim dl As DataLabel
>        For Each scol In chtobj.Chart.SeriesCollection
>            For Each dl In scol.datalabels
>                With dl.Font
>                    .Name = "Arial"
>                    .FontStyle = "Fet"
>                    .Size = 8
>                    .Strikethrough = False
>                    .Superscript = False
>                    .Subscript = False
>                    .OutlineFont = False
>                    .Shadow = False
>                    .Underline = xlUnderlineStyleNone
>                    .ColorIndex = xlAutomatic
>                    .Background = xlAutomatic
>                End With
>                With dl
>                    .NumberFormat = "#,##0"
>                    .AutoScaleFont = True
>                End With
>            Next
>        Next
>
> OR
>
>    'chtobj.Chart.Legend.AutoScaleFont = True
>        With chtobj.Chart.Legend.Font
>            .Name = "Arial"
>            .FontStyle = "Normal"
>            .Size = 8
>            .Strikethrough = False
>            .Superscript = False
>            .Subscript = False
>            .OutlineFont = False
>            .Shadow = False
>            .Underline = xlUnderlineStyleNone
>            .ColorIndex = xlAutomatic
>            .Background = xlAutomatic
>        End With
>    chtobj.Chart.Legend.Position = xlBottom
>
>
>
> Regards
> 


0
Not3496 (13)
12/6/2004 12:07:13 AM
Marie -

I have a brief description of this problem on my web site:

   http://peltiertech.com/Excel/Charts/FixFonts.html

In this page I treat it as an annoyance related to the appearance of the fonts in 
the charts, but you're seeing it as a real problem with the chart's function. 
Basically, setting AutoFontScale to False will double the number of charts you may 
have without getting these problems.

The page above also describes a procedure to make the default setting for 
AutoFontScale = False.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Marie J-son wrote:

> I just found that if I deactivate the autosize function it work again. And 
> if I try to activate the autosize again, i get a error message "there is not 
> allowed with more fonts in the sheet" or something.
> 
> I know I have read something about autosize funktion combined with many 
> chartobjects. Any knowing if I can get rid of the probelms if I just set 
> font autosize function to false instead in the code?
> 
> Regards
> 
> 
> "Marie J-son" <Not@email.com> skrev i meddelandet 
> news:uVNmiSy2EHA.3000@TK2MSFTNGP15.phx.gbl...
> 
>>Hi,
>>
>>I have been using code to loop for each chtobj in a worksheet to set font 
>>size right etc.
>>
>>Sometimes an error occur and the size become 1 pt. I can live with that 
>>once or so, but I can't change the FONT BACK neither with code nor from 
>>excel chart GUI. No code are running in background during this of cource, 
>>I try even to change the font from Excel GUI with macro switched off. It 
>>can only be solved with building a new chartobject...
>>
>>Have any of you got this error, any knowing why it occure and what I can 
>>do about it?
>>
>>I thougt it was because some of the charts had no values or some refere to 
>>empty cells, but now, after some hours fixing this, the probelm still come 
>>to me....
>>
>>Please tell me!
>>
>>For the interested:
>>The procedure I ran is an ordinary kind of:
>>
>>LIKE:
>>   Dim scol As Series
>>   Dim dl As DataLabel
>>       For Each scol In chtobj.Chart.SeriesCollection
>>           For Each dl In scol.datalabels
>>               With dl.Font
>>                   .Name = "Arial"
>>                   .FontStyle = "Fet"
>>                   .Size = 8
>>                   .Strikethrough = False
>>                   .Superscript = False
>>                   .Subscript = False
>>                   .OutlineFont = False
>>                   .Shadow = False
>>                   .Underline = xlUnderlineStyleNone
>>                   .ColorIndex = xlAutomatic
>>                   .Background = xlAutomatic
>>               End With
>>               With dl
>>                   .NumberFormat = "#,##0"
>>                   .AutoScaleFont = True
>>               End With
>>           Next
>>       Next
>>
>>OR
>>
>>   'chtobj.Chart.Legend.AutoScaleFont = True
>>       With chtobj.Chart.Legend.Font
>>           .Name = "Arial"
>>           .FontStyle = "Normal"
>>           .Size = 8
>>           .Strikethrough = False
>>           .Superscript = False
>>           .Subscript = False
>>           .OutlineFont = False
>>           .Shadow = False
>>           .Underline = xlUnderlineStyleNone
>>           .ColorIndex = xlAutomatic
>>           .Background = xlAutomatic
>>       End With
>>   chtobj.Chart.Legend.Position = xlBottom
>>
>>
>>
>>Regards
>>
> 
> 
> 

0
12/6/2004 4:11:59 AM
Reply:

Similar Artilces:

Printing Barcode Font in RS2008
We have several reports that use custom barcode fonts, and these have been working happily for ages. We have recently deployed our reports to a sql2008 instance and have hit a big problem. The Report Previews correctly in Reporting services (i.e. the user sees the barcode) The report previews AND prints correctly in VS2008. but... When we print from Reporting services the barcodes font is not displayed (gibbersish characters are displayed instead). We have checked that the users all have the barcode fonts installed locally. We have also installed the barcode fonts on t...

Adding Excel Spreadsheets to a website
I've searched the fora, and can't find these specific issues addressed so any help is greatly appreciated. I have an intranet website for distribution of documents to coworkers. It works just fine for .pdf's, word and html files, but I've run into snag with some Excel files. I'm using direct links to the files, s they open up in the web browser. All files are protected at the Shee and Workbook levels. Some files open and close (via the "Back" button just fine. Others, however, produce the following popup upon exit: This document has been modified. Do you ...

Open an Excel file via a script and Run a macro
I wish to open an Excel file via a script and run a specified macro, then save the file at a certain time each day. I looked up the Microsoft site and found the code below which Opens all files in a directory, runs a macro on all then closes. It pretty much does what I want except I just have one specified file, problem is I'm not sure what part of the code I change, I just can't work it out. Hope someone can help Important information I guess is Path where file exists: T:\2008\sean\my documents\Daily Report.xls (this is a mapped drive on my PC) Macro name: CompileReport Code from ...

Change Colours of Records
the Hi Is there a way to change the colours of screens if a different status of the record is selected? Thanks Mark ...

caption font
Hi, I would like to know if it is possible to change by program the font used in caption bar, menu, status bar, ... Thank you Raymond Mercier Raymond Mercier wrote: > Hi, > > I would like to know if it is possible to change by program the font > used in caption bar, menu, status bar, ... > > Thank you > > Raymond Mercier The status bar is a control, and like other controls its font can be changed by calling its SetFont function with a CFont that you initialize. But the caption bar and menus are drawn by Windows using the system preferences. You cannot direct...

How can i change cell colour depending on month of date in cell?
I have a column with a range of dates corresponding to when an item was tested and would like to automatically change the colour depending o which month it was tested. Jan-Mar = red, Apr-Jun= green, Jul-Sep blue and Oct-Dec= yellow. No date = no colour. Anyone have an suggestions? Do I need to run a macro or is there a simpler way? Thanks And -- andy7 ----------------------------------------------------------------------- andy75's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3017 View this thread: http://www.excelforum.com/showthread.php?threadid=49860 ...

Getting rid of spam/finding source
Hello - We're getting blacklisted and con't find the source opf the spam/virus. Here's are some entries from the event log: Event Type: Error Event Source: MSExchangeTransport Event Category: NDR Event ID: 3030 Date: 6/15/2010 Time: 3:31:53 PM User: N/A Computer: SBSSERVER Description: A non-delivery report with a status code of 2.0.0 was generated for recipient rfc822;j.neff@sbcglobal.net (Message-ID <SBSSERVERnYnTdbhbpx00001f03@mail.olec.com>). For more information, see Help and Support Center at http://go.mic...

Change Password from RPC/HTTP(s) Connection in Outlook
I have a ton of clients which I have setup to use an RPC proxy in Outlook 2003 so that they can use Outlook and not OWA, from outside of the local network. One thing I find now that is becoming an issue is that there is no real good way for a user who is never physically plugged into our network, to change his/her password. OWA is able to do this, and on the fly I set that up, which is super ugly though. This got me thinking to ask, if anyone knows of a way for users to update their passwords with the Outlook client. Seems that Microsoft seriously overlooked this in their design of Outlook...

How do I change the default reminder time on custom follow up dat.
I want to change the default reminder time when I select "Custom" as my follow up flag. Right now it defaults to 4pm. I know where the reminder time setting is in Tools/Options, but that's not changing the reminder time for Custom follow up flags. Change the Quick Click Flag to anything except Today and it will default to the start of your work day. http://www.outlook-tips.net/archives/2010/20100405.htm -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tip...

Can't get at downloaded transactions
While Money was going through it's online update I also was in the process of requesting a download of transactions from a bank which uses web statements rather than direct statements. Somehow things must have gotten out of sync so that now Money is showing I have 19 transactions from this institution to review (which is correct) but it doesn't present me with anything to review when I'm in that account. I've tried re-downloading from the bank but that doesn't help. Any ideas how I can access the downloaded transactions? In microsoft.public.money, Ken wrote: &...

Excel with Concatenate does not format date correctly
I am using Excel 2007. I want to use concatenate to combine employee name with date started. The date is not showing correctly. A1=Jane Doe B1=10/8/2011 C1=CONCATENATE(A1,B1) The screen shows: Jane Doe40824 What do I need to do differently, so it says: Jane Doe10/8/2011 Use : =A1&" "&TEXT(A2,"mm/dd/yyyy") Daniel > I am using Excel 2007. I want to use concatenate to combine employee > name with date started. > The date is not showing correctly. > > A1=Jane Doe > B1=10/8/2011 > > C1=CONCATENATE(A1,B1) > The screen shows: > Jane ...

OWA Change password problem!
Hi All I have Exchange 2003 SP1 running on W2K Advanced server with SP4. Whenever I try to change my password through OWA I get a 404 error page. Can someone help me with this?? Thanks in advance Saleh Ghaleb ...

How to write in Japenese font?
I want to write in Japenese font in Word. Is there any possibility to write in MS Office 2003 with On-screen keyboard? Yes. It's not a Word thing, it's a Windows thing. Go to Start > Control Panel > Regional and Language Options, and try to follow the tabs and buttons for "installing a new keyboard" (not "installing a new language") They are rather different in XP, Vista, and 7. In XP you need to check the box for "Asian scripts" (not "complex scripts"). There are many different input methods for Japanese; you can read ...

When running a macro I keep getting a box (Print Macro Definition.
I have a macro in which I am printing a report made from a query and each time I run the macro a box comes up sayd print Macro Denifitions and I can check or uncheck properties, actions and arguments and permissions by user and group. Or I can click on Ok or cancel. If I click on cancel, it runs ok and doesn't print out anything, but if I click on OK, then about 10 pages come out aft er the report prints. ...

Can't open word or excel; office v x
I hope someone can help me. I have just got office v x and have loaded it onto my powerbook G4. I then removed the disk and was left with the office v application box open on screen. Next I double clicked on the word icon and was prompted to put in the product key numbers etc which I did. Once completed, word begins to open but as it's loading all the bits it gets to optimizing font menu performance and stops. after a while 'application unexpectedly quit' notice replaces the word start up panel. any idea how I can get past this. I have used the office disk to remove the office ...

getting the rectangle occupied by line in CRichEditCtrl
hi group, i am able to get the line number from the caret position. with something like this CRichEditCtrl m_rich; long i, j; CPoint p1, p2, pCaret; m_rich.GetSel (i, j); p1 = m_rich.GetCharPos (i); p2 = m_rich.GetCharPos (j); pCaret = m_rich.GetCaretPos (); int m_CurLine = m_rich.LineFromChar (i) + 1; int m_CurColumn = i - m_rich.LineIndex (m_CurLine-1) + 1; but now i want to get the rectangle of this line for CRichEditCtrl how i can do this? because i read on codeproject a highlighting demo but it is for CEditView void CHiliteEditView::GetLineRect(int nLine, LPRECT lpRect) const { ...

Trying to get Microsft Money Plus Deluxe to work on 2 machines...
I purchased a boxed version of Microsoft Money Plus Deluxe and loaded it onto my Lenovo Windows Vista laptop with no problems. I then went to load it onto my Dell Inspiron 6000 Windows XP laptop, but when the Activation screen came on, it would not allow me to enter all the digits of the Product Key into the Activation fields. So, I deleted Microsoft Money Plus Deluxe from the Dell Inspiron 6000 Windows XP laptop, purchased a new version of Microsoft Money Plus Deluxe (with a unique Product Key), loaded it onto my Dell Inspiron 6000 Windows XP laptop, and now have the same thing happeni...

How to get out of a listbox?
Hi! Need a little help please. Question, how do I terminate/close the listbox after the user made one selection? My code filling up a the listbox and calling a Userform1 Thank's ahead for any pointers. Sub slist() i = 1 For Each ws In Worksheets UserForm1.ListBox1.AddItem (Worksheets(i).Name) i = i + 1 Next ws UserForm1.Show End Sub Userform1 code:---------------------------------------- Private Sub ListBox1_Click() Sheets(UserForm1.ListBox1.Value).Select End Sub Not sure I have got the problem, but maybe try Sub slist() i = 1 Userform1.Listbox1.Clear For Each ws In Wor...

Changing default email programme from Outlook express to M'soft Outlook
1 How is this done? Have loaded the software and set Outlook as default but cannot send emails from Outlook and received mails still go into Express 2 How does one copy personal folders across 1) You can change your default mail program by: - Open Internet Explorer - Go to Tools -> Internet Options - Click on the programs tab - next to "E-mail", select Microsoft Outlook ***You may still be receiving mails in Outlook Express because you still have it open. You need to close Outlook Express and only open Outlook in order to EXCLUSIVELY RECEIVE mail in Outlook. 2)You can use...

Signature Fonts
We are using Outlook 2000 and need to disable the font selection for signature blocks (we want to keep it at Times New Roman 10). Is this possible? Again thank you in advance for your help. ...

Save Changes question?
I have a form with 2 subforms. Our construction managers will be able to edit or add new projects. I have allowed for edits and additions in properties. Will that information automatically be saved? If not, what do I do to make that happen? Thanks so much!!! "Golfinray" <Golfinray@discussions.microsoft.com> wrote in message news:65D974EA-C044-4118-8AB4-E1031DEA272A@microsoft.com... >I have a form with 2 subforms. Our construction managers will be able to >edit > or add new projects. I have allowed for edits and additions in properties. > Will that information ...

Excel Charting
When I select the two series data columns from my workbook page an prepare a new Excel chart on the chart wizard the axes always appear o the chart reversed from what I want them to be. I have searched all th Help and MS docs to see how to reverse the axes to suit my requirement Can anyone please advise a method. tks, BigBo -- BigBo ----------------------------------------------------------------------- BigBob's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1611 View this thread: http://www.excelforum.com/showthread.php?threadid=27558 Instead of adding from ...

How do I get a histogram using EXCEL
Using Office 2007 how to you draw a histogram, given grouped data and frequency? I know you could do this with 2003 using the tools option. Thanks ngwenya - If the data are already grouped, create a Column chart type. The Histogram tool is used when you have ungrouped, raw data. It prepares a frequency distribution, i.e., it groups the data, and then it creates a Column chart. If you have the original, ungrouped, raw data, you can use the Histogram tool, or you could use my free Better Histogram add-in, available at www.treeplan.com. - Mike Middleton http://www.DecisionToolworks.c...

reinstalled OL- cannot change store or get previous store up
Hi. please review attached as I have screen print and question. Thanks in advance for your help. Mike http://www.freefilehosting.net/download/3h8jj People will be wary of downloading a file from an unknown source. "MikeR-Oz" <MikeROz@discussions.microsoft.com> wrote in message news:8FD8A102-2DDE-4809-93BB-C01EF33272B3@microsoft.com... > Hi. > > please review attached as I have screen print and question. Thanks in > advance for your help. > Mike > > http://www.freefilehosting.net/download/3h8jj Ok thanks DL- without the images my problem is- How ...

Is there font size limitation on antialiasing?
Hi, I made a program to display a character on LCD. To apply anti-aliasing, I created font with ANTIALIASED_QUALITY flag. [ CFont.CreateFont(... , lfQuality, ...) ] The problem is like this: When I displayed characters that the font size is larger than about 680-pixel, the anti-alising is not applied on displayed character. So I tested my program on the other computer. (My computer is Win2k, the other is WinXP.) At this time, characters that the font size is larger than 330-pixel is displayed with no anti-aliasing. On MSDN, [ ANTIALIASED_QUALITY ] Windows NT 4.0 and later: Font is ant...