View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
laura_in_abq laura_in_abq is offline
external usenet poster
 
Posts: 15
Default Went from Office 2003 to 2007. Error 438 VB v.6.5.

This code was "fine" before I went to Excel 2007. Now I get 438 "Object
doesn't support this property or method".... It would be a lot of code to
reproduce here - and it's a different environment so I can't cut and paste -
so this is the gist of it. In particular I'm using VB to make charts (plot
from data in spreadsheets in the same workbook). The problems are around
making text boxes.

sub make_chart
....
apply_label
end sub
sub apply_label
activechart.shapes.addshape(msoShapeRectangle(300, 50,180,15).select '
Line 1
selection.characters.text = "This text" ' Line 2
end sub

I'll get the 438 on Line 2. But only if I've called apply_label from
make_chart. If I end when I get the 438 dialog box, and then just execute
apply_label, no error, no problem. Just baffling.

Is there some general hints on VB when going from 2003 to 2007? Did I not
set my environment up with the install of Excel 2007? Thanks in advance.