Thread: Text Box Error
View Single Post
  #1  
Old 07-30-2008, 03:49 PM
ZavNice ZavNice is offline
Registered User
 
Join Date: 22 May 2008
Location: New Jersey
Posts: 44
ZavNice is an unknown quantity at this point
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
The code with it is
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
I will appreciate anyone's help. Thanks.
Reply With Quote