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

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
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,191,190
Messages
5,985,202
Members
439,947
Latest member
fabiannic

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
Top