ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autoshape textbox (https://www.excelbanter.com/excel-programming/345038-autoshape-textbox.html)

[email protected]

Autoshape textbox
 
I want to copy a textbox in its entirity and paste it to a location on
another sheet inside the same workbook prior to printing the sheet.

ActiveSheet.Shapes("Text Box 17").Select
Selection.Copy
Sheets("Pre Bid PRNT").Select
Range("A28").Select
ActiveSheet.Paste
Sheets("Pre Bid PRNT").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Pre Bid PRNT").Select
Sheets("Pre Bid").Select

It is failing on the Range("A28").Select statement If I remove it I
get results but it is pasted in "A1". i want it to appear further down
the sheet.

Any ideas what is wrong?


Tom Ogilvy

Autoshape textbox
 
Your probably running this code from a sheet module. so you need to qualify
that statement with the sheet name:

ActiveSheet.Shapes("Text Box 17").Select
Selection.Copy

With Sheets("Pre Bid PRNT")
.Select
.Range("A28").Select
.Paste
.PrintOut Copies:=1, Collate:=True
End With
Sheets("Pre Bid").Select

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
I want to copy a textbox in its entirity and paste it to a location on
another sheet inside the same workbook prior to printing the sheet.

ActiveSheet.Shapes("Text Box 17").Select
Selection.Copy
Sheets("Pre Bid PRNT").Select
Range("A28").Select
ActiveSheet.Paste
Sheets("Pre Bid PRNT").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Pre Bid PRNT").Select
Sheets("Pre Bid").Select

It is failing on the Range("A28").Select statement If I remove it I
get results but it is pasted in "A1". i want it to appear further down
the sheet.

Any ideas what is wrong?




Don Guillett[_4_]

Autoshape textbox
 
Does this help?

Sub copyshape()
Sheets("sheet7").Shapes("Text Box 45").Copy
Application.Goto Sheets("Sheet4").Range("c12")
ActiveSheet.Paste
Sheets("sheet4").PrintOut
End Sub
--
Don Guillett
SalesAid Software

wrote in message
oups.com...
I want to copy a textbox in its entirity and paste it to a location on
another sheet inside the same workbook prior to printing the sheet.

ActiveSheet.Shapes("Text Box 17").Select
Selection.Copy
Sheets("Pre Bid PRNT").Select
Range("A28").Select
ActiveSheet.Paste
Sheets("Pre Bid PRNT").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Pre Bid PRNT").Select
Sheets("Pre Bid").Select

It is failing on the Range("A28").Select statement If I remove it I
get results but it is pasted in "A1". i want it to appear further down
the sheet.

Any ideas what is wrong?




[email protected]

Autoshape textbox
 
I applied Toms changes from above and that worked for me.


Don Guillett[_4_]

Autoshape textbox
 
Whatever floats your boat


--
Don Guillett
SalesAid Software

wrote in message
oups.com...
I applied Toms changes from above and that worked for me.





All times are GMT +1. The time now is 05:33 PM.

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