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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try
VBA Code:
Sheet1.Range("D"&Sheet1.Range("S2").Value).Value = Application.UserName & " - " & Now
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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