Hi
I have VB that updated cells with username when the user updates a row. However it seems that it is updatng each row with the user
Example:
user.one will upated a row and cell is updated with that username, user.two then updates the second row, but this time it will update first and second ow with that usrename.
this is what Ineed
Columns
A |B | C
1 | 2 | User.One | 02/02/2019
2 | 2 | User.Two | 03/02/2019
but this is what is happening when user.two then updates cell B 1 and 2
Coumns
A | B | C
1| 2 | User.Two | 02/02/2019|
2| 2 | User.Two | 03/02/2019
And so on.......
The code for ths.
I am sure there is a way to prevent it overwriting each time.
Many anks for n assistance.
Martyn
I have VB that updated cells with username when the user updates a row. However it seems that it is updatng each row with the user
Example:
user.one will upated a row and cell is updated with that username, user.two then updates the second row, but this time it will update first and second ow with that usrename.
this is what Ineed
Columns
A |B | C
1 | 2 | User.One | 02/02/2019
2 | 2 | User.Two | 03/02/2019
but this is what is happening when user.two then updates cell B 1 and 2
Coumns
A | B | C
1| 2 | User.Two | 02/02/2019|
2| 2 | User.Two | 03/02/2019
And so on.......
The code for ths.
Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]NotSentMsg = ""[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] SentMsg ="Sent"[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 'Above theMyLimit value it will run the macro[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] MyLimit = 1[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 'Set the rangewith the Formula that you want to check[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] SetFormulaRange = Me.Range("C7:C300")[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] On Error GoToEndMacro:[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] For EachFormulaCell In FormulaRange.Cells[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] WithFormulaCell[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] IfIsNumeric(.Value) = False Then[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] MyMsg = "Not numeric"[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Else[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] If.Value > MyLimit Then[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 'MyMsg = SentMsg[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] MyMsg = Environ("username")[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] If .Offset(0, 1).Value = NotSentMsg Then[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Call Mail_with_outlook3[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] End If[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Else[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] MyMsg = NotSentMsg[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] EndIf[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] End If[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Application.EnableEvents = False[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] .Offset(0, 1).Value = MyMsg[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 'IfMyMsg = "Sent" And .Offset(0, 2).Value = "" Then[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] IfMyMsg = Environ("username") And .Offset(0, 2).Value = ""Then[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] .Offset(0,2).Value = Now[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] End If[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Application.EnableEvents = True[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] End With[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] NextFormulaCell[/COLOR][/SIZE][/FONT]
I am sure there is a way to prevent it overwriting each time.
Many anks for n assistance.
Martyn