Write in the spreadsheet having a form open

L

lidmat

Hi everybody,
How can I write in the spreadsheet having a form open? I can not use
the ShowModal property.
Thanks in advance.
Lidmat
 
C

Chip Pearson

If the form is displayed modally, you cannot access the worksheet
while the form is visible. To display the form modelessly, use

Userform1.Show vbModeless


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
L

lidmat

Thank you but it doesn't do what I need, I've written a small exampl
that shows what happen


--There is a first user form that calls the second one that should b
modeless
Private Sub Introducedatamanually_Click()
UserForm1.Hide
UserForm2.Show vbModeless //The code jumps to the next line an
doesn't
MsgBox ("Hello") //go to the second form
Unload UserForm2
End Sub

--After entering the data manually I want to come back to the firs
form using the ---Comeback buton that is on the second form
Private Sub Comeback_Click()
Unload Me
UserForm1.Show
End Sub

It means I can not enter the data in the sheet because the cod
continue runing without stopping in the userform2.

Somebody knows how to make the form stay on the screen until th
comeback button has been pressed?

Thanks again
Lidma
 
Top