P
pallaver
I have an interesting predicament that I can't figure out.
Below is the code I have which fills out a text box. If ShikiChange >
7, i.e. there are more than 7 colors used, then instead of just
displaying all 8 or more, like it does with 4, 5, or 7, the text box
becomes blank.
I added in the MsgBox's to see what was going on, and inside the the
message box TeishutsuTextBoxPhrase looks fine and ShikiChange = 8.
Is this blank text box due to some limitation with a text box, aka too
many characters inputted into it? Where's the glitch causing anything
past ShikiChange = 7 to give a blank text box?
Any help much appreciated.
-------------------------- CURRENT CODE USED
---------------------------------
ShikiChange = 0
For RowTest = 2 To ColorC - 1
If Sheets("$B>HL@?'(B").Cells(1, RowTest).value = 1 Then
If ShikiChange = 0 Then
ShikiChange = ShikiChange + 1
TeishutsuTextBoxPhrase = "$B51EY7W:90[$K$h$kJd@5$N$?$a!"(B" & Chr(10) & "ST$B51EY(B
$B7W?'EYA@$$CM$O2<5-$H$9$k!#(B" & Chr(10) & _
(Sheets("$B>HL@?'(B").Cells(2, RowTest).value) & " : x=" &
(Sheets("$B>HL@?'(B").Cells(8, RowTest).value) & ",y=" & (Sheets("$B>HL@(B
$B?'(B").Cells(9, RowTest).value)
Else
ShikiChange = ShikiChange + 1
TeishutsuTextBoxPhrase = TeishutsuTextBoxPhrase & Chr(10)
& _
(Sheets("$B>HL@?'(B").Cells(2, RowTest).value) & " : x=" &
(Sheets("$B>HL@?'(B").Cells(8, RowTest).value) & ",y=" & (Sheets("$B>HL@(B
$B?'(B").Cells(9, RowTest).value)
End If
End If
Next RowTest
MsgBox TeishutsuTextBoxPhrase
MsgBox "Number of ST color variations: " & (ShikiChange)
' THIS CREATES THE STANLEY BASE COLOR TEXT BOX.
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 300, 469 -
13.5 * ShikiChange, 215, 41 + 13.5 * ShikiChange).Select
Selection.Characters.Text = TeishutsuTextBoxPhrase
With Selection.Characters(Start:=1, Length:=12).Font
.Name = "StanleyCorrelation"
.FontStyle = "$BI8=`(B"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Below is the code I have which fills out a text box. If ShikiChange >
7, i.e. there are more than 7 colors used, then instead of just
displaying all 8 or more, like it does with 4, 5, or 7, the text box
becomes blank.
I added in the MsgBox's to see what was going on, and inside the the
message box TeishutsuTextBoxPhrase looks fine and ShikiChange = 8.
Is this blank text box due to some limitation with a text box, aka too
many characters inputted into it? Where's the glitch causing anything
past ShikiChange = 7 to give a blank text box?
Any help much appreciated.
-------------------------- CURRENT CODE USED
---------------------------------
ShikiChange = 0
For RowTest = 2 To ColorC - 1
If Sheets("$B>HL@?'(B").Cells(1, RowTest).value = 1 Then
If ShikiChange = 0 Then
ShikiChange = ShikiChange + 1
TeishutsuTextBoxPhrase = "$B51EY7W:90[$K$h$kJd@5$N$?$a!"(B" & Chr(10) & "ST$B51EY(B
$B7W?'EYA@$$CM$O2<5-$H$9$k!#(B" & Chr(10) & _
(Sheets("$B>HL@?'(B").Cells(2, RowTest).value) & " : x=" &
(Sheets("$B>HL@?'(B").Cells(8, RowTest).value) & ",y=" & (Sheets("$B>HL@(B
$B?'(B").Cells(9, RowTest).value)
Else
ShikiChange = ShikiChange + 1
TeishutsuTextBoxPhrase = TeishutsuTextBoxPhrase & Chr(10)
& _
(Sheets("$B>HL@?'(B").Cells(2, RowTest).value) & " : x=" &
(Sheets("$B>HL@?'(B").Cells(8, RowTest).value) & ",y=" & (Sheets("$B>HL@(B
$B?'(B").Cells(9, RowTest).value)
End If
End If
Next RowTest
MsgBox TeishutsuTextBoxPhrase
MsgBox "Number of ST color variations: " & (ShikiChange)
' THIS CREATES THE STANLEY BASE COLOR TEXT BOX.
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 300, 469 -
13.5 * ShikiChange, 215, 41 + 13.5 * ShikiChange).Select
Selection.Characters.Text = TeishutsuTextBoxPhrase
With Selection.Characters(Start:=1, Length:=12).Font
.Name = "StanleyCorrelation"
.FontStyle = "$BI8=`(B"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With