Copy Textbox Text

Zanatos

Board Regular
Joined
May 18, 2007
Messages
65
I have a textbox on my worksheet and I need a macro that will copy the text on the inside, when I did this manually I recieved the following code.


Sub Macro1()
ActiveSheet.Shapes("Text Box 1198").Select
Selection.Characters.Text = "Rev. June 20, 2008"
With Selection.Characters(Start:=1, Length:=18).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("AL48").Select
ActiveSheet.Paste
End Sub



This works, but I need to be able to change the text in the textbox and have it print the new text. Right now, if I change the text it always says "Rev. June 20, 2008". I am aware that the code has that listed right in it but I have been working on this problem for awhile and can't find a solution. Does anyone know what I can do?


Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
If you change the text in:

Selection.Characters.Text = "Rev. June 20, 2008"

doesn't the new text appear in the TextBox?
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,739
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top