0

I have a code which processes an excel sheet row by row.

Under certain conditions, certain manual manipulations are to be done on the data in the rows. For this, the program fires a UserForm. The UserForm contains certain fields which are populated from the underlying excel rows. These fields are then manipulated by the user and certain buttons on the userform are clicked. Once the manual processing is done, the program then needs to proceed with the rest of the rows in the Excel sheet. When the UserForm is triggered, before taking action on the USERFORM, user needs to to see

a) What is pushed up in the UserForm

b) Contents of the Underlying Excel Sheet

The program needs to wait till the user takes action

However, there seems to be no easy way to let the user see the underlying rows as the Userform (on top) prevents access to the Excel Sheet below. To allow access to the Excel Worksheets, I tried using

UserForm.Show vbModeless

UserForm.Show False

Both of these are totally bypassing the Userform and the program runs for the remaining rows without waiting for the user input.

I researched here and found this.

deactivate Excel VBA userform

In my Case, the MainProgram calls the UserForm and has to wait for the user input in the USERFORM before processing further rows. If the conditions triggering the userform are not met, the program proceeds to the next rows.

Help highly appreciated. Thanks in advance.

EDIT:

As a workaround I have written a line to select the cell where the manual intervention is triggered. This brings that cell right under the manual intervention UserForm. The UserForm can now be moved around to look at what is below.

Community
  • 1
  • 1
Peekay
  • 238
  • 11
  • 21

1 Answers1

0

How about adding a de-activate Button to your form using this script:

Private Sub CommandButton1_Click()
    UserForm1.Hide
        MsgBox "hit OK to continue", vbOKOnly, "Script Paused"
    UserForm1.Show
End Sub
Mike Powell
  • 260
  • 1
  • 6