![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Quote:
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 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Patrick
I don't believe you could "dock" a userform. Why can't they simply drag it out the way? |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
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. |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
The toggle button is a great idea. I will try it out. Thanks!
__________________
Thanks in advance, Patrick |
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Apr 2002
Location: Pittsburgh, PA
Posts: 317
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|