ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error 1004 using Shapes.Range().Align (https://www.excelbanter.com/excel-programming/302517-error-1004-using-shapes-range-align.html)

juergen

Error 1004 using Shapes.Range().Align
 

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(s trPicName
strPicAlign)).Align msoAlignRights, Fals

--
Message posted from
http://www.ExcelForum.com


Norman Jones

Error 1004 using Shapes.Range().Align
 
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")


---
Regards,
Norman


"juergen " wrote in message
...

Hi Forum
i have a big problem with the Align-Comand,for rearranging the Elements
of the Shapes-Collection.
the above Syntax works fine on my system , but the colleagues in italy
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" or
something?
any ideas? many thanks
Juergen

Workbooks(1).Sheets("Sheet1").Shapes.Range(Array(s trPicName,
strPicAlign)).Align msoAlignRights, False


---
Message posted from
http://www.ExcelForum.com/




Peter T[_3_]

Error 1004 using Shapes.Range().Align
 
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

-----Original Message-----

Hi Forum
i have a big problem with the Align-Comand,for

rearranging the Elements
of the Shapes-Collection.
the above Syntax works fine on my system , but the

colleagues in italy
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" or
something?
any ideas? many thanks
Juergen

Workbooks(1).Sheets("Sheet1").Shapes.Range(Arra y

(strPicName,
strPicAlign)).Align msoAlignRights, False


---
Message posted from http://www.ExcelForum.com/

.


keepITcool

Error 1004 using Shapes.Range().Align
 
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


juergen wrote:


Hi Forum
i have a big problem with the Align-Comand,for rearranging the

Elements
of the Shapes-Collection.
the above Syntax works fine on my system , but the colleagues in italy
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" or
something?
any ideas? many thanks
Juergen

Workbooks(1).Sheets("Sheet1").Shapes.Range(Array(s trPicName,
strPicAlign)).Align msoAlignRights, False


---
Message posted from
http://www.ExcelForum.com/




All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com