Hoopsah
10-11-2013, 06:13 AM
Hi,
Can you have a look at the macro behind the button "Edit" on Sheet 1.
It should take the value from cell F20 and copy it into the tab - Metering under column J
THe code I am using is:
Sub Amend_Record()' Amend_Record Macro
Dim pos As Long
Dim UTask As String
UTask = Range("UTask").Value
On Error Resume Next
pos = Application.Match(UTask, wsMetering.Columns(8), 0)
On Error GoTo 0
With wsMetering
If pos > 0 Then
.Cells(pos, "J").Value = Range("F20").Value
MsgBox "Record " & UTask & " amended"
Else
MsgBox "Not a Valid Reference", vbExclamation, "ERROR"
End If
End With
End Sub
All help Appreciated
Can you have a look at the macro behind the button "Edit" on Sheet 1.
It should take the value from cell F20 and copy it into the tab - Metering under column J
THe code I am using is:
Sub Amend_Record()' Amend_Record Macro
Dim pos As Long
Dim UTask As String
UTask = Range("UTask").Value
On Error Resume Next
pos = Application.Match(UTask, wsMetering.Columns(8), 0)
On Error GoTo 0
With wsMetering
If pos > 0 Then
.Cells(pos, "J").Value = Range("F20").Value
MsgBox "Record " & UTask & " amended"
Else
MsgBox "Not a Valid Reference", vbExclamation, "ERROR"
End If
End With
End Sub
All help Appreciated