PETTY CASH

  • Thread starter josros60 via OfficeKB.com
  • Start date
J

josros60 via OfficeKB.com

Hi,

I have a petty cash sheet, and there's one column for miscellaneous account,
so i have data validation list box so when i pick the account shows the
description and account but then i just want to display the account number
after i selected,by the way i have petty cash sheet and code sheet where it
pull the account from.

here it's the code for the petty cash sheet: ( i don't know what i am doing
wrong it display it put both but i just want the account number.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errHandler
If Target.Cells.Count > 1 Then GoTo exitHandler
If Target.Column = 2 Then
If Target.Value = "" Then GoTo exitHandler
Application.EnableEvents = False
Target.Value = Worksheets("Codes").Range("A1") _
.Offset(Application.WorksheetFunction _
.Match(Target.Value, Worksheets("Codes").Range("ProdList"), 0), 0)
End If

exitHandler:
Application.EnableEvents = True
Exit Sub

errHandler:
If Err.Number = 13 Or Err.Number = 1004 Then
GoTo exitHandler
Else
Resume Next
End If

End Sub



(is there anyway i can post the file so it's easy to know what i am talking
about, if any body want to use it, it's OK.

Thank you very much for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top