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!
 

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.
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

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