-
I want copy/change this "workbook event code" to a commdbutton & save in a new file. Once I click the button then the invoice file can be updated.
one more question.
If Range "Descrirption" not contains "*IP*" then Cell.I48 is empty.
I try to use : Else msg = ""
but failed.
How to change the code? Thanks!
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Not Intersect(Target, Sh.Range("nw_invoice_item_name")) Is Nothing Then
msg = "Item no. "
For Each cell In Sh.Range("nw_invoice_item_name").Columns(1).Cells
If cell.Value Like "*IP*" Then
msg = msg & Sh.Cells(cell.Row, Sh.Range("nw_invoice_item_index").Column).Value & ", "
End If
Next cell
msg = msg & " Plating for " & Sh.Range("nw_customer_name").Cells(1, 1).Value & _
" Inv.# " & Sh.Range("nw_invoice_no").Cells(1, 1).Value
Sh.Range("I48").Value = msg
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules