+ Reply to Thread
Results 1 to 2 of 2

UserForm (Advanced): Copying controls between tabs in a multipage

  1. #1
    Registered User
    Join Date
    11-26-2003
    Posts
    8

    Question UserForm (Advanced): Copying controls between tabs in a multipage

    Hi,

    I'm building a nested userform (5 tabs, split in to a further 5 subsections).

    On each of the 25 tabs, I have a series of sliders and linked text box objects, together with some code that updates the text box when a slider is adjusted. The idea is that the user can adjust monthly uplifts/downlifts for each of the categories, so I need to be able to grab the value of the slider for calculations when they click "Go".

    As such, I've named each slider something sensible that specifies the page it's on (e.g. "Tab1 Subtab1 Slider1" say for argument).

    I'm at the stage of having done this on page 1. I now want to copy the objects in to the other 24 multitab pages. The problem I have is that if I do this, all the object names are lost and replaced by the defaults, e.g. TextBox2, and renaming them is a very time consuming process.

    Question
    Is there a way of partially retaining the object names but changing the relevant sheet name when I copy on to a new tab. E.g. if I copy my slider1 to tab1, subtab 2, its name becomes "Tab1 Subtab2 Slider1". Fairly sure there must be a way of doing this through code - but not sure how to run VBA on a 'VBA' environment.

    Thanks

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: UserForm (Advanced): Copying controls between tabs in a multipage

    there's some code in this page that shows how to add controls to a form using its Designer object: http://forums.esri.com/Thread.asp?c=93&f=992&t=298827
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1