Dynamic Range - Electronic Signature

tomexcel1

New Member
Joined
Feb 22, 2018
Messages
47
Hi All

I currently have a simple code (below) that creates an electronic signature on a document.

I have a formula in Cell S2 that tells me the row the signature should be on. For example on row 309. how can i incorporate this in to my code so that if someone deletes two rows and now the signature needs to be on row 307. I can make the formula in cell S2 update to 307 but cant think how to add it to the vba to make it dynamic.

Can anyone help and im I just overthinking this

VBA Code:
Private Sub CommandButton3_Click()
Sheet1.Unprotect ("PASSWORD")
Sheet1.Range("D309").Value = Application.UserName & " - " & Now
Sheet1.Protect ("PASSWORD")
End Sub


Thanks
Tom
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try
VBA Code:
Sheet1.Range("D"&Sheet1.Range("S2").Value).Value = Application.UserName & " - " & Now
 
Upvote 0

Forum statistics

Threads
1,215,332
Messages
6,124,313
Members
449,153
Latest member
JazzSingerNL

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