Thread: Textbox
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
majikman[_16_] majikman[_16_] is offline
external usenet poster
 
Posts: 1
Default Textbox

So I'm trying to play around with the text boxes a bit so I can hopefully figure it out for myself. I don't understand this error I'm getting in the code below. If I use the code below, I get a Run-time error '91': Object variable or With block variable not set. I understand what the error is saying but I don't understand why its occuring because if I change ActiveChart.Shapes to ActiveSheet.Shapes, it works fine. Can someone please explain this to me? Thank

Dim oObj As Shap
For Each oObj In ActiveChart.Shape
If oObj.Type = msoTextBox The
oObj.DrawingObject.Font.Size = 2
End I
Next oObj