Macro to delete and replace a text box
Sub AAAC()
Dim wkbk1 As Workbook
Dim wkbk2 As Workbook
Set wkbk1 = Workbooks("Archive.xls")
Set wkbk2 = Workbooks("Book1")
wkbk2.Worksheets("Sheet1").TextBoxes.Delete
wkbk1.Worksheets("Sheet1").TextBoxes(1).Copy
Application.Goto wkbk2.Worksheets("Sheet1") _
.Range("B9")
wkbk2.Worksheets("Sheet1").Paste
End Sub
--
Regards,
Tom Ogilvy
"Dave" wrote in message
...
It is a text box from the drawing toolbar. In the past, I tried to set-up
the macro to go in and delete the text but it did not work. I will try it
again.
Thanks
"Tom Ogilvy" wrote:
What kind of textbox - from the drawing toolbar or the control toolbox
toolbar.
Why delete and add - why not just copy the text from one to the other?
--
Regards,
Tom Ogilvy
"Dave" wrote in message
...
I use a macro in a master file to populate sub-files with data. I
would
like
to delete an existing text box in the sub-files and replace it with a
text
box from the master file. Is there a way to do this using a macro?
Any
information is appreciated.
Thanks
|