Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to know how that works for Controls on Sheets,
then try the excel macro recorder Greeting Jonjo "Dave" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom
Sorry about the second reply, I am scattered all over the map. I need to replace the single box with two new boxes. The box is from the drawing toolbar. Thanks Dave "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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to figure out how staff works try the macrorecorder
and do the things you want to do with the Textboxes. here an example : sub macro1() Application.CommandBars("Picture").Visible = True Application.CommandBars("Drawing").Visible = True ActiveSheet.Shapes.AddTextbox(msoTextOrientationHo rizontal, 44.25, 173.25, _ 171#, 132.75).Select Selection.Characters.Text = "Hallo Leute" With Selection.Characters(Start:=1, Length:=11).Font .Name = "Arial" .FontStyle = "Standard" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Range("E22").Select End Sub The interesting part is The Shapes Collection of the WorkSheet that contains several interesting things like Buttons, Graphics and so on. Greetings Jonjo "Dave" wrote: Hi Tom Sorry about the second reply, I am scattered all over the map. I need to replace the single box with two new boxes. The box is from the drawing toolbar. Thanks Dave "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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Replace/Delete Text Using "Watchword" List? | Excel Discussion (Misc queries) | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
Creating a macro to find and replace text | Excel Worksheet Functions | |||
Replace Number with Text using Macro | Excel Discussion (Misc queries) | |||
Macro to delete and replace a text box | Excel Discussion (Misc queries) |