nathandavies
02-22-2018, 07:05 AM
Hi All,
I have this code which has been working fine, but i'm trying to use the same data for something else now. at the minute the code adds new information from the userform to the next row down, i'm wanting to change it so it adds an extra row above the data. will always be a new row 5. In my new code i need the cells to be fixed (C5, D5, E5 F5 ) with the new information only.
'Write from form to ufDataPrivate Sub Summary()
Dim ws As Worksheet, tgt As Range
Set ws = Sheets("ufData")
Set tgt = ws.Columns(1).Find(Me.tbProj)
If tgt Is Nothing Then Set tgt = ws.Cells(Rows.Count, 1).End(xlUp)(2)
With Me
tgt.Resize(, 10) = Array(.tbProj, .tbOrder, .tbDelivery, .frEngineering.Tag, .frApproval.Tag, .frComp.Tag, .frMetal.Tag, .frProduction.Tag)
End With
End Sub
Hope this makes sense.
ND
I have this code which has been working fine, but i'm trying to use the same data for something else now. at the minute the code adds new information from the userform to the next row down, i'm wanting to change it so it adds an extra row above the data. will always be a new row 5. In my new code i need the cells to be fixed (C5, D5, E5 F5 ) with the new information only.
'Write from form to ufDataPrivate Sub Summary()
Dim ws As Worksheet, tgt As Range
Set ws = Sheets("ufData")
Set tgt = ws.Columns(1).Find(Me.tbProj)
If tgt Is Nothing Then Set tgt = ws.Cells(Rows.Count, 1).End(xlUp)(2)
With Me
tgt.Resize(, 10) = Array(.tbProj, .tbOrder, .tbDelivery, .frEngineering.Tag, .frApproval.Tag, .frComp.Tag, .frMetal.Tag, .frProduction.Tag)
End With
End Sub
Hope this makes sense.
ND