PDA

View Full Version : Solved: Display userform pause code



dcherk1
11-14-2007, 08:14 AM
Hi--- This problem seems pretty basic, but for some reason I can't find the appropriate means of resolving it.
Here is the deal. At some point in my macro, I want to display a message box, and pause the code until the user presses ok. The catch is that I want the user to be able to browse through the workbook (look at other worksheets, scroll through the sheets, possibly even edit the data), while the msgbox is up. Modeless forms don't work, because the code keeps running.

The solutions that I managed to find so far, all try to somehow work around the problem. Is there a direct way to do this?

Bob Phillips
11-14-2007, 08:41 AM
Try



ans = Application.InputBox("You can browse the workbook, press oK to quit",Type:=8)

dcherk1
11-14-2007, 09:20 AM
Wow!...:doh: that was easy. Thank you very much!

Bob Phillips
11-14-2007, 11:16 AM
It's not idea, but it works.