Hi,
I have two open workbooks - one is a macro-enabled workbook (daily invoice file) created from a template and has a new name each day, and the other is a regular workbook (customer file) with a fixed name. Both are always open during the day. Depending on the customer selected in the invoice, I need to generate the next sequential number from a list, which I can do with formulas. The list is stored in the customer file (Sheet2) because the invoice file is reset each day. My problem is copying the generated number from cell "K4" of the invoice file (and it could be on any of several sheets) to the next available line of Sheet2 (column A) on the customer file, so the next time a new number is needed, it gets the next one. I tried assigning a variable, but since I won't know the filename or sheetname of the invoice file, I didn't know how to do that. I can select the range ("K4") but cannot get it to copy to the last line of the customer file without getting the runtime error '1004' method of range class failed. This is the section of code I've been using (I know it's clunky, but I'm learning as I go):
Thank you in advance for any help that is offered. It is very much appreciated!
Bookmarks