ListBox Docking

poleary2000

Active Member
Joined
Apr 1, 2002
Messages
354
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.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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
 
Upvote 0
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.
 
Upvote 0
Hi Patrick


I don't believe you could "dock" a userform. Why can't they simply drag it out the way?
 
Upvote 0
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.
 
Upvote 0
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?
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,986
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top