# Pop-up Input Form that retains and posts data



## Noddyparp (Nov 30, 2022)

Hi,
I am trying to have a pop-up input form which you enter and select data into, which will keep that data as well as posting it to the relevant area in the main sheet. Currently it is a separate sheet, but I want to use only the one sheet and have a pop-up over it.

It looks like:





You enter straight into:

Employee ID
Employee Name
Old & New Hourly Rate
Old & New Location Allowance Rate
Payrun Start is a drop down box sourced from a "Data" Sheet
Payrun End is a calc 14 days after Payrun Start

The tick boxes have some VB Code which allow the Old Rates to be copied to the New Rates if applicable.

Code is:

_Private Sub CheckBox1_Click()
    If CheckBox1.Value Then
        Range("C12") = Range("C10").Value2
    Else
        Range("C12").ClearContents
    End If
End Sub

Private Sub CheckBox2_Click()
    If CheckBox2.Value Then
        Range("G12") = Range("G10").Value2
    Else
        Range("G12").ClearContents
    End If
End Sub

Not sure if that is relevant._

Then it would needs a Close/Hide Button, but should be able to accessed via a key combination (macro) if needed again.

Oh, each field except the tick boxes are "Names". Some are referenced elsewhere on the "Main" Sheet or the "Data" Sheet.

I have tried a few things with no success to date.

Any help appreciated.

Thanks,
Wazza


----------



## breynolds0431 (Dec 18, 2022)

Hi. I will probably need more specifics, but I put together a workbook and added to DropBox (shared WB link) based on some of my assumptions. 

An image of the file and userform is below. I have two tabs in the WB - a "Data" tab, where the Payroll Adjustment information is written to, and a "RunDates" tab with a list of bi-weekly dates. On the "Data" tab, there will be a text box with "Create Adjustment". Click that and the userform to create the new adjustment will display.


----------

