Error 1004 using Shapes.Range().Align

  • Thread starter Thread starter juergen
  • Start date Start date
J

juergen

(e-mail address removed)
Hi Forum
i have a big problem with the Align-Comand,for rearranging the Element
of the Shapes-Collection.
the above Syntax works fine on my system , but the colleagues in ital
get the 1004-runtime-error
and i absolutly ran out of ideas why the codeline fails
the images named in strPicName and strPicAlign are existing
what else is important befor using the Align-Command?
and are there any local Excel-settings for "error-toleranc" o
something?
any ideas? many thanks
Juergen

Workbooks(1).Sheets("Sheet1").Shapes.Range(Array(strPicName
strPicAlign)).Align msoAlignRights, Fals
 
Hi Jurgen,

Maybe your colleagues have another workbook which is Workbooks(1) - possibly
a Personal.xls!

Try replacing : Workbooks(1)

with: Workbooks("Your Workbook Name")
 
Hi Juergen,

I notice you have set a reference to Workbooks(1)

Are you sure your colleagues are running your code with
only one workbook open. Try changing the reference to
ThisWorkbook or ActiveWorkbook or Workbooks("filename"),
as appropriate.

Regards,
Peter
 
juergen,

probably its' a snippet of code where shapes are inserted into a new
workbook.

it depends on users excel language version if the worksheets are named
as Sheet1 or Tabelle1 or Foglio1..

if possible try using a numeric index => Worksheets(1)
or work with an object like activesheet



keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top