LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
Pasting numbers and formulas without pasting format. Dan Excel Discussion (Misc queries) 3 March 27th 05 03:47 AM
Event procedures for controls added with Controls.Add John Austin[_4_] Excel Programming 1 March 9th 05 03:31 PM
Pasting ActiveX or Form Controls jcliquidtension Excel Programming 1 December 26th 04 11:40 AM


All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"