PDA

View Full Version : vbModeless question



austenr
02-26-2021, 09:07 AM
I want to open a user form where people go to grab information. Its used occasionally throughout the day many times. The problem is I want the userform to remain active and still allow the opening of other workbooks so they are not constantly opening the workbook everytime they want to use the form. If I use


userform1.show

it of course disables the use of any other workbook until the form is closed.

I tried this to keep the form and its associated workbook open and still allow opening of other workbooks:


Call UserForm.Show(vbModeless)

in the workbook open but it throws an error. Any ideas on how to solve this is appreciated.

Jan Karel Pieterse
02-26-2021, 09:55 AM
Userform.Show vbModeless

Paul_Hossler
02-26-2021, 12:05 PM
1. UserForm or UserForm1 ???

First example uses UserForm1, but the troublesome line uses just UserForm


Call UserForm.Show(vbModeless)



2. Both ways belowwork for me. That WB opens, UF displays, and I can open other workbooks



Private Sub Workbook_Open()
Load UserForm1
Call UserForm1.Show(vbModeless)
End Sub


or



Private Sub Workbook_Open()
Load UserForm1
UserForm1.Show vbModeless
End Sub