Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default pasting to a location

Hi I know this is basically a repeat of a past post of mine but I never got
it answered so I am trying again.
I need to copy from a hidden worksheet & paste to a hidden diaog box,
putting the picture in a specific location in the dialog box. My code isn't
working, here is what I have...

This is my current code. It doesn't work & hangs up where I try to place the
image.

If Sheets("Order Info").Cells(4, 6).Value = "2270" Then
Sheets("Doors").Shapes("2270").Copy
DialogSheets("Door").Paste

< I get an error 438 here
Selection.ShapeRange.IncrementLeft 144.75
Selection.ShapeRange.IncrementTop 34.5
DialogSheets("Door").Show


Can anyone help me do this?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default pasting to a location

Hi,
-Do you get the error on the line
DialogSheets("Door").Paste
or on thne line
Selection.ShapeRange.IncrementLeft 144.75
?
-What is the active sheet when these lines of code are executed.
-What is the description of the error?

Regards,
Sebastien
"Web_Builder" wrote:

Hi I know this is basically a repeat of a past post of mine but I never got
it answered so I am trying again.
I need to copy from a hidden worksheet & paste to a hidden diaog box,
putting the picture in a specific location in the dialog box. My code isn't
working, here is what I have...

This is my current code. It doesn't work & hangs up where I try to place the
image.

If Sheets("Order Info").Cells(4, 6).Value = "2270" Then
Sheets("Doors").Shapes("2270").Copy
DialogSheets("Door").Paste

< I get an error 438 here
Selection.ShapeRange.IncrementLeft 144.75
Selection.ShapeRange.IncrementTop 34.5
DialogSheets("Door").Show


Can anyone help me do this?
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default pasting to a location

I get the error on the
Selection.ShapeRange.IncrementLeft 144.75
line.

the active sheet is worksheet not before mentioned, the only one visable to
the viewer.

The error is as follows:
Run-time error '438':
Object doesn't support this property or method.


"sebastienm" wrote:

Hi,
-Do you get the error on the line
DialogSheets("Door").Paste
or on thne line
Selection.ShapeRange.IncrementLeft 144.75
?
-What is the active sheet when these lines of code are executed.
-What is the description of the error?

Regards,
Sebastien
"Web_Builder" wrote:

Hi I know this is basically a repeat of a past post of mine but I never got
it answered so I am trying again.
I need to copy from a hidden worksheet & paste to a hidden diaog box,
putting the picture in a specific location in the dialog box. My code isn't
working, here is what I have...

This is my current code. It doesn't work & hangs up where I try to place the
image.

If Sheets("Order Info").Cells(4, 6).Value = "2270" Then
Sheets("Doors").Shapes("2270").Copy
DialogSheets("Door").Paste

< I get an error 438 here
Selection.ShapeRange.IncrementLeft 144.75
Selection.ShapeRange.IncrementTop 34.5
DialogSheets("Door").Show


Can anyone help me do this?
Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default pasting to a location

ok.
-One thing: to Selection, the sheet needs to be activated. In any case, it
is better not to use it when possible and use code that does not depend on
the activation of the sheet, something like (also, i removed the use of
SHapeRange):
Dim Counter as Long
If Sheets("Order Info").Cells(4, 6).Value = "2270" Then
Sheets("Doors").Shapes("2270").Copy
DialogSheets("Door").Paste
i= DialogSheets("Door").Shapes.Count '<-- shape is last one added
...
DialogSheets("Door").Shapes(i).IncrementLeft 144.75
DialogSheets("Door").Shapes(i).IncrementTop 34.5
DialogSheets("Door").Show

Does this work for you?
Regards,
Sebastien

"Web_Builder" wrote:

I get the error on the
Selection.ShapeRange.IncrementLeft 144.75
line.

the active sheet is worksheet not before mentioned, the only one visable to
the viewer.

The error is as follows:
Run-time error '438':
Object doesn't support this property or method.


"sebastienm" wrote:

Hi,
-Do you get the error on the line
DialogSheets("Door").Paste
or on thne line
Selection.ShapeRange.IncrementLeft 144.75
?
-What is the active sheet when these lines of code are executed.
-What is the description of the error?

Regards,
Sebastien
"Web_Builder" wrote:

Hi I know this is basically a repeat of a past post of mine but I never got
it answered so I am trying again.
I need to copy from a hidden worksheet & paste to a hidden diaog box,
putting the picture in a specific location in the dialog box. My code isn't
working, here is what I have...

This is my current code. It doesn't work & hangs up where I try to place the
image.

If Sheets("Order Info").Cells(4, 6).Value = "2270" Then
Sheets("Doors").Shapes("2270").Copy
DialogSheets("Door").Paste

< I get an error 438 here
Selection.ShapeRange.IncrementLeft 144.75
Selection.ShapeRange.IncrementTop 34.5
DialogSheets("Door").Show


Can anyone help me do this?
Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pasting chart getting source data from new location Mr. Mike Charts and Charting in Excel 2 July 18th 09 07:24 PM
Macro - save to current location vs excel default location leezard Excel Discussion (Misc queries) 0 October 28th 08 03:04 PM
Tab location [email protected] Excel Discussion (Misc queries) 4 June 26th 07 03:26 AM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
Pasting numbers and formulas without pasting format. Dan Excel Discussion (Misc queries) 3 March 27th 05 03:47 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"