Funds tracking with VBA and Excel

Hewlett packard hp Smart buy elitebook 8...
July 21, 2020 at 03:27:44
Specs: Windows 7, i5-4600
We are currently assisting a NGO with about 100 welfare workers by providing them with branding and exposure support. The committee recently approached me to request if there is a way to track the weekly funds provided to their welfare workers using excel. A company which went out of business recently donated a few systems to them which come with a barcode scanner, they are wondering if it would be possible to integrate this within the workbook.

Column B1 will be where the barcode scanner inputs the ID from their badges
Column B4 to XX would be their ID
Column C4 to XX would be their name
Column D4 would be a cell that should be highlighted red once the barcode scanned matches their ID
Column E4 would have a "C" inserted for collected
Column F4 would record the time and date of fund collection

Having no experience and wanting to help them, I was wondering if this code from DerbyDad03 within this forum could be adapted to work?

Private Sub Find(ByVal Target As Range)
    Dim LastRow As Long
    LastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

SheetName = "WWID List"

With Sheets(WWID_List)

If Target.Address = "$B$1" Then
    If Target <> "" Then
    With Range("B4:B" & LastRow)
        Set bc = .Find(Target, lookat:=xlWhole)
            If Not bc Is Nothing Then
                Range(Cells(bc.Column, 3)).Interior.ColorIndex = 6
                Cells(bc.Column, 4) = "C"
                Cells(bc.Column, 5) = Now
            Else: MsgBox "WWID Not Found"
            End If
    End With
End If
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub


See More: Funds tracking with VBA and Excel


#1
July 21, 2020 at 13:15:04
It would help if you included a link to the thread where you found that code. With close to 5000 posts in this forum it's kind of difficult to remember the purpose of every macro that I've suggested.

Just looking at that code doesn't even tell me if it worked for the person I wrote it for.

Please post the link to the relevant thread.

message edited by DerbyDad03


Reply ↓  Report •

#2
July 21, 2020 at 20:22:42
Thank you very much for getting back to me.

Here is the link to the thread that you replied to:
https://www.computing.net/answers/o...

I do apologize in advance as my knowledge when it comes to Excel + VBA is very limited. With the difference in general and class modules.

They have also informed me is there a way to prompt when a duplicate comes up? ie: A welfare Worker has already taken their funds and is trying to collect again.


Reply ↓  Report •

#3
July 23, 2020 at 18:44:05
I'm confused...

You said: "I was wondering if this code from DerbyDad03 within this forum could be adapted to work?"

Then you posted a link to a thread where I did indeed post some code, but not the code that you posted here.

I don't know where that version of the code came from, but it can't possibly work - for anything. It probably won't even run.

message edited by DerbyDad03


Reply ↓  Report •

Related Solutions

#4
July 24, 2020 at 01:42:36
Oh no, I apologise for the confusion.

Let us just start from scratch, is there any possible way that I can accomplish what was stated in my previous post?

Column B1 will be where the barcode scanner inputs the ID from their badges
Column B4 to XX would be their ID
Column C4 to XX would be their name
Column D4 would be a cell that should be highlighted red once the barcode scanned matches their ID
Column E4 would have a "C" inserted for collected
Column F4 would record the time and date of fund collection


Reply ↓  Report •

Ask Question