Button with moving cell reference

Cat129

Board Regular
Joined
Oct 20, 2012
Messages
96
Hi All,

I'm not sure how to do this so hoping you can help

I have a button on an excel form and when you click it, it send an automated email to someone to say they approve the document.

What I would also like is for it to put the date they clicked the button and their user name into certain cells. I know how to do the code for this, the issue I have is the button and related cells are at the bottom of the form.

If a user adds or removes rows above the sign off boxes at the bottom in the form the cell reference for the date and name move either up or down. Is there a way to dynamically ensure the date and name always go into the cells adjacent to the button?

The bottom of the sheet looks like the below

RoleNameSignatureDate
DesignerPerson 1Approval ButtonSignatureusername generated by codeDatedate generated by code
Chief EngineerPerson 2Approval ButtonSignatureusername generated by codeDatedate generated by code
Gate KeeperPerson 3Approval ButtonSignatureusername generated by codeDatedate generated by code
Program ManagerPerson 4Approval ButtonSignatureusername generated by codeDatedate generated by code
Data CoordinatorPerson 5Approval ButtonSignatureusername generated by codeDatedate generated by code

<tbody>
</tbody>

Thanks,
Cat
 
So tell me do you have anything in column D starting at row 55? Or is the cell empty.

And if you were to double click on D55 you want Username in J55 and Todays date in N55 is that correct?

D55 is a blank cell currently, when the form is filled in, it will have the name of a person in there (The Design Engineer). For example Joe Bloggs. This will be the case for D55:D59 as per the screenshot above. But this cell reference could change as explained earlier.

Once the form is approved by all, I then need the person to click / double click something that will send an approval email, add the user name of the person that did the clicking into cell J55 and add the date it was clicked into N55

Each person will need to do this process who is listed in the screen shot above. The names are not the same for each form.

Hopefully this screenshot helps a little more

<a href="https://ibb.co/hzT6Xz"><img src="https://preview.ibb.co/gaaWze/Capture.jpg" alt="Capture" border="0"></a><br /><a target='_blank' href='https://poetandpoem.com/Louis-Esson/poems'>poems by Louis Esson</a><br />
 
Last edited:
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I just did some googling on how to create an action from a double click, and I'm pretty sure I can make that work.

I can unmerge some cells and create a cell with Approve in it, that when double clicked would do what I need. I assume I can then just write the code in the form RC so that when rows are added or removed it wouldn't affect the code.

Thank You so much, just didn't know this possible
 
Upvote 0
So looks like you do not need any more help from me.
Take care glad to see you know how to do this.
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,284
Members
449,218
Latest member
Excel Master

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