Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

Help with pop-up dialog box in Excel

With some help of some of the members of this site the Excel tool attached to this posting is almost ready I need assistance with the last bit.  

The tool basically compares two sets of data and creates a report showing the changes between “Prior Data” and the “Current Data”.  To run the report the user pushes the “Process Changes” button on the top right corner of the “Data” worksheet.  The report is created on the worksheet “Changes”.

The part I need help with is after the “Changes” worksheet is created I want to – as much as is practical – force the user to supply “justification” for the changes shown on the “Changes” worksheet.  I hope to accomplish this by having a dialog box pop-up for the user to enter text for their justification.  I would like this pop-up dialog to appear once for every row appearing on the “Changes” worksheet (excluding the top two header rows).  I’ve never worked with pop-up dialog boxes before and don’t really know how to approach a solution.
Finally I would like the text the user enters (not more than 50 characters) into the pop-up dialog box to appear in column P on the Changes worksheet.  

Any help would be much appreciated.

CheckChangesTool-4.xlsm
0
dec789
Asked:
dec789
  • 3
  • 2
1 Solution
 
TracyVBA DeveloperCommented:
Try this:
Sub RequireExplanation()

    Dim i As Long
    Dim lastRow As Long
    
    lastRow = Worksheets("Changes").Range("A" & Rows.Count).End(xlUp).Row

    For i = 3 To lastRow
        Cells(i, "P").Value = Left(InputBox("Enter Change Justification for ID " & Cells(i, 1).Value & ":", "Change Justification"), 50)
    Next i

End Sub

Open in new window

CheckChangesTool-4.xlsm
0
 
dec789Author Commented:
That works great!  I was envisioning tons of code to pull this off.  Thanks for the solution can I ask for one tweak???  Can you put a check-box on the dialog box that if checked the justification supplied would be applied to all rows of the Changes report?   If you don’t have time I understand you have already more than earned the 500 points.
0
 
TracyVBA DeveloperCommented:
>>Can you put a check-box on the dialog box that if checked the justification supplied would be applied to all rows of the Changes report?

The "pop up box" is an input box, and you can't add any controls to it, like a checkbox.  However, I can add a message box after it asking if you want to apply this reason to all changes.  See attached.
CheckChangesTool-4-v2.xlsm
0
 
dec789Author Commented:
Thank you broomee9 that was an excellent solution.  Thank you again for all you help.
0
 
TracyVBA DeveloperCommented:
You're quite welcome :-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now