How to retain useform data and how to set the ranges if the ranges needs to change based on the cell ( trigger for userform ) double clicked

Chucky3006

New Member
Joined
Jun 20, 2017
Messages
11
Good day to all

I require a complicated code regarding userforms.

1. I managed to create the user form.
2. I managed to link the user form data to only specific cells.

The challenge i am faced with is the following:

On sheet1 i have a spread sheet indicating all the employees and each day for the month.

I need to indicate the overtime worked for each employee on each day or indicate if the employee was present.

on sheet9 I have a form that must be printed for application of the overtime.

So the idea is to double click the applicable date for that employee's overtime (ex. F2 ) the userform form pops up i enter multiple data into multiple datepicker boxes and text boxes. I then select a commandbutton that saves the data in cells ( sheet1) and enter the data on the form (sheet2) and then prints the form on sheet2 with the default printer. when i doubel click on F2 the data previously entered should be brought back into the userform but when i exit the userform it should not print only when i select command to print should it print. Al of this should also aply when i doubble click ( E7 )

Rows 3,4,5 and 6 will be hidden.

AEFGHI
110-03-201811-03-201813-03-201814-03-201815-03-2018
2ChuckyPRESENT4 HOURS4 HOURSDAY OFFPRESNET
3textBox1 datacover John annual leave
4TextBox2 dateapplied by Hein
5DTPIcker1 data07h00
6DTPicker2 data11h00
7Pieter4 hoursA/LA/LPRESENTPRESNET
8cover Peet annual leave

<tbody>
</tbody>

I will really appreciate assistance on this one.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,215,473
Messages
6,125,018
Members
449,203
Latest member
tungnmqn90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top