Creating "Approve" cells in excel checklist

rmcp20

New Member
Joined
Apr 4, 2014
Messages
6
Hi,

I have checki, which is digitaly signed at the bottom, as an end of day validation.

However, there are several intraday tasks that have to be "approved".


I've previously seen a document where by double clicking a cell it would add our pc login username to that cell.

Does anyone know how to do this?

Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
The code your looking for is Environ$("UserName"), below is code that sits on the worksheet and checks for the double click. I have included the other option of using the application username so you can see what both do

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

'UserName = Application.UserName 'Excels User name
UserName = Environ$("UserName") ' system user name
ActiveCell.Value = UserName

End Sub
 
Upvote 0
Hi again,

I was thinking about this thread whilst cycling to work this morning and thought that you don't want people insert their names all over the place so make sure you add a rule that means this code will only run in the column you want...for example if you wanted to only allow a double click to insert their name in column F then change the code to this:

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
[COLOR="#FF0000"]If ActiveCell.Column = 6 Then[/COLOR]
'UserName = Application.UserName 'Excels User name
UserName = Environ$("UserName") ' system user name
ActiveCell.Value = UserName
[COLOR="#FF0000"]Else
End If[/COLOR]
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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