|
|||||||||||||||||||||
|
#1
|
|||
|
|||
|
Text Box Error
Hello everyone. I'm recieving a Run-Time Error that says "The item with the specified name wasn't found". It's point to this line of
Code:
ActiveChart.Shapes("Text Box 2").Select
Code:
Sheets("Chart1").Select
ActiveChart.Shapes("Text Box 2").Select
ActiveChart.Shapes("Text Box 2").Top = 12
ActiveChart.Shapes("Text Box 2").Height = 18
ActiveChart.Shapes("Text Box 2").Width = 120
ActiveChart.Shapes("Text Box 2").Left = 510
ActiveSheet.TextBoxes.Add(487003.5, 0, 1742961, 220063.5).Select
ActiveChart.Shapes("Text 3").Select
ActiveChart.Shapes("Text 3").Height = 18
ActiveChart.Shapes("Text 3").Width = 120
ActiveChart.Shapes("Text 3").Top = 1
ActiveChart.Shapes("Text 3").Left = 65
Selection.Characters.Text = "Citigroup Internal"
With Selection.Characters(Start:=1, Length:=18).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
'Selection.ShapeRange.ScaleHeight 0.78, msoFalse, msoScaleFromTopLeft
ActiveChart.Shapes("Text Box 1").Select
ActiveChart.Shapes("Text Box 1").Top = 22
ActiveChart.Shapes("Text Box 1").Height = 28
ActiveChart.Shapes("Text Box 1").Left = 65
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=18).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
|
|
#2
|
||||
|
||||
|
You will probably find it's a typo!
Text Box 2 should really look like TextBox2 unless you changed it!
__________________
Regards, Simon Please read this before cross posting! Please always give feedback...good or bad! Please take the time to read the Forum Rules before posting! |
|
#3
|
|||
|
|||
|
After I changed Text Box 2 to TextBox 2, I recieved an error for
Code:
ActiveSheet.TextBoxes.Add(487003.5, 0, 1742961, 220063.5).Select |
|
#4
|
||||
|
||||
|
You cannot add the textbox and select it at the same time!
__________________
Regards, Simon Please read this before cross posting! Please always give feedback...good or bad! Please take the time to read the Forum Rules before posting! |
|
#5
|
|||
|
|||
|
I fixed the problem I was having. For the
Code:
ActiveSheet.TextBoxes.Add(487003.5, 0, 1742961, 220063.5).Select Code:
ActiveChart.Shapes.AddTextbox(msoTextOrientationHorizontal, 391.58, 7.11, _
273.95, 44.24).Select
|
![]() |
| Bookmarks |
New topics in Excel 2007 Help
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|