Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pasting controls
hi all,
i have a multipage (MultiPage1) with controls on it (labels, textboxes and combo boxes). page1 (index 0) will always be there. this function should add a new page, and copy all the controls from the first page, and paste them on to the newly added page: Private Sub AddAnother_Click() MultiPage1.Pages.Add "Page" & (MultiPage1.Pages.Count + 1), "Address " & (MultiPage1.Pages.Count + 1), 1 MultiPage1.Pages(1).Controls.Copy Dim newPage As Object Set newPage = MultiPage1.Pages.Item((MultiPage1.Pages.Count - 1)) newPage.Paste End Sub i am getting an error on newPage.Paste Run-time error '-2147024809 (80070057) Could not paste the control. Invalid argument. what am i missing? tia J |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Pasting on Filtered Data Sheets without pasting onto hidden cells | Excel Discussion (Misc queries) | |||
Pasting numbers and formulas without pasting format. | Excel Discussion (Misc queries) | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
Pasting ActiveX or Form Controls | Excel Programming |