Consulting

Results 1 to 5 of 5

Thread: Userform limit?

  1. #1
    VBAX Contributor Glaswegian's Avatar
    Joined
    Sep 2004
    Location
    Glasgow, Scotland
    Posts
    196
    Location

    Userform limit?

    Hi

    Is there any limit on the number of userforms that Excel 2010 can work with?

    I've been having issues with a workbook that I wrote before we switched to Excel 2010 and a developer team are now looking at a re-write. One of their suggestions is using userforms, which sounds fine except, depending on their proposed solution, there could be several hundred userforms in the final version.

    I have some ideas to reduce this but I'm curious if Excel has any limits/issues in respect of userforms. Can't find anything definitive on the web.

    Thanks.
    Iain - XL2010 on Windows 7

  2. #2
    Several hundred userforms? I can hardly imagine an Excel solution that would need that many!
    Why so many?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    VBAX Contributor Glaswegian's Avatar
    Joined
    Sep 2004
    Location
    Glasgow, Scotland
    Posts
    196
    Location
    Hi Jan

    It's a bit of a long story - the workbook is a guide (of sorts) for users - they answer the first question by clicking a Yes or No command button. Depending on the answer this leads to another question, and so on. Eventually an 'answer' is exported to a new workbook and saved. Worked great until we switched to Excel 2010 - Excel has issues rendering the command buttons and tends to collapse them all together on one single line. This happens using both ActiveX controls and Form controls. Apparently MS don't even have a solution so some kind of re-write seems to be the only option.

    The developer team are suggesting using one userform for each question which could potentially lead to having several hundred userforms - hence my question.

    Thanks.
    Iain - XL2010 on Windows 7

  4. #4
    If you ask me the dev team has no idea about userforms.
    I expect you only need one userform.
    Does each question have a fixed set of answers?
    Does the number of answers vary per question?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    The collapsing issue sounds like the TopLeftCell property was not set.

    You could just fill a userform and reuse it.
    e.g.
    [VBA]Sub test()
    With UserForm1
    .TextBox1.Text = "Hello"
    .Show
    End With
    With UserForm1
    .TextBox1.Text = "world!"
    .Show
    End With
    End Sub[/VBA]

Posting Permissions

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