ActiveX text box changes font size depending on selection status

Special K

Board Regular
Joined
Jun 20, 2011
Messages
83
Office Version
  1. 2010
Platform
  1. Windows
I have an ActiveX text box that displays text from external text files. This works correctly, but the font size of the text changes depending on whether I am selecting inside the text box (including the vertical scroll bar) or not. When the text box/scroll bar is not selected, the text is smaller than when it is selected. Is there any way to prevent this behavior?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Unable to mimic what you described - text size remains identical regardless of what I do :confused:

You could try this (pure stab in the dark and will probably make no difference!)
Code:
Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    TextBox1.Font.Size = 12
End Sub

1. Which is the correct size?
- when selected? or when not selected?

2. Try making the text twice as big
- does the same thing happen?
- is the "incorrect" size the same as before or has it also doubled in size?

3. Try a textbox without a scrollbar
- does the same thing happen

4. Which version of Excel are you running?
 
Upvote 0
Unable to mimic what you described - text size remains identical regardless of what I do :confused:

You could try this (pure stab in the dark and will probably make no difference!)
Code:
Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    TextBox1.Font.Size = 12
End Sub

1. Which is the correct size?
- when selected? or when not selected?

2. Try making the text twice as big
- does the same thing happen?
- is the "incorrect" size the same as before or has it also doubled in size?

3. Try a textbox without a scrollbar
- does the same thing happen

4. Which version of Excel are you running?

1. The font is larger when I select inside the text box. I am not sure which one is the "correct" font size.

2. If I make the font twice as big (22 vs 11), the font expands in the X direction only when I click inside the text box.

3. This behavior occurs even without any scrollbars.

4. 2010
 
Upvote 0
Bump - anyone else?

I don't seem to be able to edit my previous post, so I'll add this:

This behavior also seems to occur with buttons - the label font size increases when the button is selected vs. when it is not selected.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top