Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pasting chart getting source data from new location | Charts and Charting in Excel | |||
Macro - save to current location vs excel default location | Excel Discussion (Misc queries) | |||
Tab location | Excel Discussion (Misc queries) | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) | |||
Pasting numbers and formulas without pasting format. | Excel Discussion (Misc queries) |