Error 1004 using Shapes.Range().Align

J

juergen

[email protected]
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
 
N

Norman Jones

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")
 
P

Peter T

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
 
K

keepITcool

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 >
 
Top