ListBox Docking
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: ListBox Docking

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a UserForm that I would like to user to see at all times. Is there anyway to write some code that will make the UserForm Dockable?? Meaning, it attaches itself to Excel [kind of like the Locals window in the VBA editor].

    Any help would be appreciated.
    Thanks in advance,
    Patrick

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-03 13:12, poleary2000 wrote:
    I have a UserForm that I would like to user to see at all times. Is there anyway to write some code that will make the UserForm Dockable?? Meaning, it attaches itself to Excel [kind of like the Locals window in the VBA editor].

    Any help would be appreciated.
    Hi Patrick,

    My guess is no, although if you have Excel XP you can make a modeless UserForm (Stephen Bullen's website http://www.BMSltd.co.uk has an example of a modeless userform in Excel 97/2000. (not 100% sure of the address here)

    What you can do is create a custom toolbar and either dock it or keep it floating over the sheet. An add-in may be another possiblity.

    Please provide more details about your userform and somebody is sure to take a stab at it.

    Regards,
    Jay

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am using a modeless user form. It contains a list box that is constantly being refreshed after a cell in the worksheet is changed. I was hoping to be able to dock it so the user could always see the form and still work in Excel. It is currently working this way, however the for is floating and obstructs the users view.
    Thanks in advance,
    Patrick

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Patrick


    I don't believe you could "dock" a userform. Why can't they simply drag it out the way?




  5. #5
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    other options include;
    1) Having Min/max buttons if you need to place the for in the task bar while they work
    2) making the for Ajustable ie. similar to a
    true VB form that is able to be resized.

    Let me know if this option is satifactory.


    Kind Regards,
    Ivan F Moala From the City of Sails

  6. #6
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The users can move the user form out of the way. I would rather not have them do that however.

    Min / Max buttons is a viable option. How do I put those on a UserForm?

    I am using Excel 2002 and the UserForm I have created is Modeless. If someone from Excel 2000 / 97 uses the file, will it be modeless for them also?

    Thanks in advance,
    Patrick

  7. #7
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Patrick


    Excel 2000 supports Modless UserForms, but 97 doesn't.

    To shrink/expand try a simple ToggleButton

    Code:
    Private Sub ToggleButton1_Click()
    
    If ToggleButton1 = True Then
        ToggleButton1.Caption = "Expand"
           Me.Height = Me.Height * 0.2
    Else
        ToggleButton1.Caption = "Shrink"
             Me.Height = 240
    End If
       
    End Sub

  8. #8
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The toggle button is a great idea. I will try it out. Thanks!
    Thanks in advance,
    Patrick

  9. #9
    Board Regular
    Join Date
    Apr 2002
    Location
    Pittsburgh, PA
    Posts
    354
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    You mentioned Excel 97 does not support modeless forms. What would happen if an Excel 97 user would attempt to use my file that does have a modeless form?

    Thanks for all the help everyone has given me.
    Thanks in advance,
    Patrick

  10. #10
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi Patrick

    This would be a problem according to the Help.

    Note: In Microsoft Office 97, if a UserForm is set to display as modeless, it causes a run-time error; Office 97 UserForms are always modal.


    See: "Show Method" in the Help.





User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com