UserForm, opening other spreadsheets?

hokiegirl

New Member
Joined
Dec 1, 2005
Messages
3
Basically, I have a macro where it goes through all my data, loops row by row, and if a certain field is missing (for example, a date), it pops up a userform, in which the user can enter in the missing information, and it then populates back into the data. The problem is, in order for the user to find the missing data, they have to use other spreadsheets. With a userform running, they cannot open up other spreadsheets. I tried using vbModeless, but it ended up running through the rest of my macro (what happens after all the data has been entered with userforms) and misses that whole step. So vbModeless doesn't work. I need to make sure they enter the data into the userforms before the rest of the code progresses.

Is there any way to do this? Basically, to have a userform open, but be able to open up other spreadsheets simultaneously, without having the rest of my code run? Thanks!
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

bk

Active Member
Joined
Jun 2, 2002
Messages
387
I'm not familiar with 'vbModeless', but is it

supposed to do the same thing as changing the "Show Modal" property for the UserForm?

I just did a quick experiment with a UserForm with Show Modal set to False and I was able to manualy open another workbook while the UF was still up.

HTH
 

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
Add this a button option on your form:


Sub myOpenWBFile()
'Standard Module code, like: Module1
'Open file in its own application window!
Dim fName As Variant, myExcel As Object

fName = Application.GetOpenFilename

If fName <> False Then
Workbooks.Open fName
Else
MsgBox "No Workbook is open!"
End If

Set myExcel = CreateObject("Excel.Sheet")

myExcel.Application.Workbooks.Open fName
ActiveWindow.WindowState = xlNormal
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,817
Messages
5,574,499
Members
412,598
Latest member
Haven1234
Top