View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] gimme_this_gimme_that@yahoo.com[_2_] is offline
external usenet poster
 
Posts: 236
Default Requesting Help (yes again) Translating a Macro into VB.Net Code

When you run the recorded macro, sizepic(), "Picture 4" already
exists, your only selecting it.

It looks like your code might work if you know for certain
XLRow.ToString() is 4 and from within C++ you're opening the Workbook
that has a "Picture 4" Shape.

If you are creating the Workbook dynamically then the problem is that
you don't have a shape object of name "Picture " + XLRow.ToString() .

Supposing you have added it then the problem is that you used a
barebones API to create the Shape and the Shape doesn't yet know it's
supposed to be a Picture.