mzza
Board Regular
- Joined
- Nov 8, 2006
- Messages
- 55
Hi there,
as per the thread title, I am trying to adjust the font size of the text in an embedded textbox in the "Quote" sheet, using the following code:
"CountryCharLength" is an integer based on the character length of the string I'm passing into the textbox, and is evaluating correctly. Why does my Select Case statement not change the font size? Like, ever? :s
On a related note - can I refer to my textbox by the name I've given it ("TxtBoxCountries") in its Properties? What's the correct syntax for that?
TIA
as per the thread title, I am trying to adjust the font size of the text in an embedded textbox in the "Quote" sheet, using the following code:
Code:
Set wordobj2 = Sheets("Quote").OLEObjects(2)
wordobj2.Object.Text = Countries_String
Select Case CountryCharLength
Case 1 - 1400
wordobj2.Object.Font.Size = 12
Case 1401 - 2000
wordobj2.Object.Font.Size = 11
Case 2001 - 2500
wordobj2.Object.Font.Size = 10
Case 2501 - 3000
wordobj2.Object.Font.Size = 9
Case 3001 - 3500
wordobj2.Object.Font.Size = 8
Case 3501 - 4000
wordobj2.Object.Font.Size = 7
Case Is > 4000
wordobj2.Object.Font.Size = 6
End Select
"CountryCharLength" is an integer based on the character length of the string I'm passing into the textbox, and is evaluating correctly. Why does my Select Case statement not change the font size? Like, ever? :s
On a related note - can I refer to my textbox by the name I've given it ("TxtBoxCountries") in its Properties? What's the correct syntax for that?
TIA