Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default really weird behavior, chart with textbox font size problem

I'm using Excel 2003 SP2

I have an embedded xy scatter chart with a few textboxes on it. I'm
trying to apply the same font size to all elements of the chart.

Trying to do this from Excel user interface does not work. Using a
macro also does not work, sort of.

Excel seems to insist on making the font size of the textboxes close
to double the rest of the chart.

Sub Macro1()
Selection.AutoScaleFont = False
With Selection.Font
.Size = 6
End With
End Sub

The above macro does not work with either True or False for the
autoscalefont setting.

Here's where it get really weird. The following macro does work by
toggling the autoscale property, but only every other time I run it.
When it works, the msgbox displays True.

Sub Macro1()
Selection.AutoScaleFont = Not Selection.AutoScaleFont
With Selection.Font
.Size = 6
End With
MsgBox Selection.AutoScaleFont
End Sub

I just got an idea, and the following macro does work every time I run
it.
Sub Macro1()
Selection.AutoScaleFont = False
With Selection.Font
.Size = 6
End With
Selection.AutoScaleFont = True
With Selection.Font
.Size = 6
End With
End Sub

The Autosize setting of the textboxes doesn't seem to have anything to
do with this.

Is this behavior by design? Or is there some property of the chart or
textboxes that makes this happen?

Thanks,

Brian Murphy
Austin, Texas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default really weird behavior, chart with textbox font size problem

Maybe someone in the Charts news group could answer your question.

"xlrotor" wrote:

I'm using Excel 2003 SP2

I have an embedded xy scatter chart with a few textboxes on it. I'm
trying to apply the same font size to all elements of the chart.

Trying to do this from Excel user interface does not work. Using a
macro also does not work, sort of.

Excel seems to insist on making the font size of the textboxes close
to double the rest of the chart.

Sub Macro1()
Selection.AutoScaleFont = False
With Selection.Font
.Size = 6
End With
End Sub

The above macro does not work with either True or False for the
autoscalefont setting.

Here's where it get really weird. The following macro does work by
toggling the autoscale property, but only every other time I run it.
When it works, the msgbox displays True.

Sub Macro1()
Selection.AutoScaleFont = Not Selection.AutoScaleFont
With Selection.Font
.Size = 6
End With
MsgBox Selection.AutoScaleFont
End Sub

I just got an idea, and the following macro does work every time I run
it.
Sub Macro1()
Selection.AutoScaleFont = False
With Selection.Font
.Size = 6
End With
Selection.AutoScaleFont = True
With Selection.Font
.Size = 6
End With
End Sub

The Autosize setting of the textboxes doesn't seem to have anything to
do with this.

Is this behavior by design? Or is there some property of the chart or
textboxes that makes this happen?

Thanks,

Brian Murphy
Austin, Texas

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird chart window size problem in XL07 Bobby Charts and Charting in Excel 0 April 13th 09 02:17 PM
UserForm TextBox Font Size AussieDave Excel Programming 0 September 10th 07 07:18 AM
Chart Auto-Size Behavior Zone[_3_] Excel Programming 1 June 27th 07 03:20 AM
textbox font size AskExcel Excel Worksheet Functions 3 September 16th 06 05:24 AM
Change font and size of a textbox Jos Vens[_3_] Excel Programming 2 May 3rd 06 09:59 AM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"