Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
new instances of nested controls
Hoping some fo your experts out there can help.
I'm working on an application that has a multipage control, with several controls within it. Depending on the value of a variable I would like to copy and paste that multipaga control (with the nested controls in it) on the userform x number of times. I know I could easily create many 20 or so copies of the multipage control at deisgn time and just hide the ones I don't need, but this seems like a rather crude method of implementing what I want to do Is there an easy way replicating a multipage control (with the nested controls) several times within a userform? I would appreciate any help you can give. Regards |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
new instances of nested controls
' in say form initialize event
Dim newPage As Page Dim nPages As Long Dim i As Long With Me.MultiPage1 nPages = .Count .Pages(0).Controls.Copy ' copy first page For i = 1 To 4 ' 20 Set newPage = .Pages.Add("Page" & (nPages + i), _ "New-Page " & (nPages + 1), nPages) newPage.Paste nPages = nPages + 1 Next End With You will probably want to sub-class events for all controls on each page, including the original page. Regards, Peter T "nytrex" wrote in message oups.com... Hoping some fo your experts out there can help. I'm working on an application that has a multipage control, with several controls within it. Depending on the value of a variable I would like to copy and paste that multipaga control (with the nested controls in it) on the userform x number of times. I know I could easily create many 20 or so copies of the multipage control at deisgn time and just hide the ones I don't need, but this seems like a rather crude method of implementing what I want to do Is there an easy way replicating a multipage control (with the nested controls) several times within a userform? I would appreciate any help you can give. Regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create list of unique instances from list of multiple Instances | Excel Worksheet Functions | |||
nested if based on nested if in seperate sheet. how? | Excel Worksheet Functions | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
Is there an easy way to replace list A instances with list B instances (sorted lists). | Excel Programming |