ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text in a Rectangle Object (https://www.excelbanter.com/excel-programming/418474-text-rectangle-object.html)

Rob

Text in a Rectangle Object
 
I have a rectangle in a worksheet "Rectangle 43", I want to copy some text I
have in a cell which is a formula (Sheet1!A5&" "&Sheet2!A5) in to this
rectangle. I select the cell containing the text, copy this and then select
the rectangle but the paste button is not available.
I have tried the following but this fails

ActiveSheet.Shapes("Rectangle 43").TextFrame.Characters.Text = Sheet1!A5&"
"&Sheet2!A5

Per Jessen

Text in a Rectangle Object
 
Hi

Try this:

ActiveSheet.Shapes("Rectangle 43").TextFrame.Characters.Text =
Worksheets("Sheet1").Range("A5") & " " & Sheets("Sheet2").Range("A5")

Regards,
Per

"Rob" skrev i meddelelsen
...
I have a rectangle in a worksheet "Rectangle 43", I want to copy some text
I
have in a cell which is a formula (Sheet1!A5&" "&Sheet2!A5) in to this
rectangle. I select the cell containing the text, copy this and then
select
the rectangle but the paste button is not available.
I have tried the following but this fails

ActiveSheet.Shapes("Rectangle 43").TextFrame.Characters.Text = Sheet1!A5&"
"&Sheet2!A5



Rob

Text in a Rectangle Object
 
Thanks for this it works a treat

"Per Jessen" wrote:

Hi

Try this:

ActiveSheet.Shapes("Rectangle 43").TextFrame.Characters.Text =
Worksheets("Sheet1").Range("A5") & " " & Sheets("Sheet2").Range("A5")

Regards,
Per

"Rob" skrev i meddelelsen
...
I have a rectangle in a worksheet "Rectangle 43", I want to copy some text
I
have in a cell which is a formula (Sheet1!A5&" "&Sheet2!A5) in to this
rectangle. I select the cell containing the text, copy this and then
select
the rectangle but the paste button is not available.
I have tried the following but this fails

ActiveSheet.Shapes("Rectangle 43").TextFrame.Characters.Text = Sheet1!A5&"
"&Sheet2!A5





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

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