Hi all,
I'm trying to add a function to a button. Currently the button creates and prints an invoice when clicked. I have an invoice tracker which tracks the invoices nearly automatically. But i need to manually enter the date the invoice was created. I'd like to add the function that when i click the button, it does an index/match search for the invoice number (located in a nearby cell) in the invoice tracker and upon finding inserts todays date into the appropriate cell next to it. Here is what I have so far:
I have tried several variations of this but cannot seem to get it to work. I doesn't trigger any errors or warnings. It just doesn't do anything. and I've exhausted my google abilities trying to find a solution. Can any one help me understand why its not working and how to make it work? Thanks in advance.
-J
I'm trying to add a function to a button. Currently the button creates and prints an invoice when clicked. I have an invoice tracker which tracks the invoices nearly automatically. But i need to manually enter the date the invoice was created. I'd like to add the function that when i click the button, it does an index/match search for the invoice number (located in a nearby cell) in the invoice tracker and upon finding inserts todays date into the appropriate cell next to it. Here is what I have so far:
VBA Code:
test = Application.WorksheetFunction.Index(Sheets("Sheet1").Range("M3:N13"), Application.WorksheetFunction.Match(Range("c4"), Sheets("Sheet1").Range("M3:M13"), 0), 2).Value = Date
I have tried several variations of this but cannot seem to get it to work. I doesn't trigger any errors or warnings. It just doesn't do anything. and I've exhausted my google abilities trying to find a solution. Can any one help me understand why its not working and how to make it work? Thanks in advance.
-J