Pause code with modeless form
-
- 4StarLounger
- Posts: 401
- Joined: 31 Oct 2017, 20:07
Pause code with modeless form
In Excel 365 I have a macro that collects selected data from a worksheet laid out horizontally. The collected data is displayed in a userform with the highlighted record behind it. I want to be able to scroll the worksheet horizontally to review the data in the userform. But when I set the userform to modeless, the code continues to process. Is there a way to pause the code until I close the userform and still be able to scroll the worksheet?
-
- Administrator
- Posts: 77253
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Pause code with modeless form
One option would be to place command buttons on the userform that scroll the sheet to the left and right.
Another one would be to use
Another one would be to use
Code: Select all
Application.InputBox Prompt:="Scroll as you like, click Cancel when done", Type:=8
Regards,
Hans
Hans
-
- 4StarLounger
- Posts: 401
- Joined: 31 Oct 2017, 20:07
Re: Pause code with modeless form
Beautiful!! I tried the Inputbox first and it works great. I'll try the scroll buttons later. Both solutions are really good.
Thanks Hans.
- Jeff
Thanks Hans.
- Jeff
-
- 4StarLounger
- Posts: 401
- Joined: 31 Oct 2017, 20:07
Re: Pause code with modeless form
And I just tried the buttons with LargeScroll. That one is even better. As always, thanks very much.