I can't use a fixed reference because the module that precedes is looping down the list checking date criteria. When it finds a row that meet the criteria some of the data is put in the second sheet, and so on.
I can't use a fixed reference because the module that precedes is looping down the list checking date criteria. When it finds a row that meet the criteria some of the data is put in the second sheet, and so on.
Then you need to assign a variable to stand for that cell you are trying to copy. Its hard to tell where because your code is too spaced out but:
I think right here you'd go
You need to dim CellAddress as a String.![]()
If ActiveCell.Value + Month(ActiveCell.Offset(0, 1).Value) < Today Then ' if contract start plus one frequency period is before present date CellAddress = ActiveCell.Address Call enterdata ' create entries on Receipts & Payments
Then when you get to the line that was causing you trouble, you should be able to go
![]()
ActiveCell.Value = Sheets("CoA").Range(CellAddress).Value
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
I did as you suggested and I am still getting a run-time error '1004', 'Application-defined or object-defined error' on the lineAlthough the code fails at this point the actual date does get pasted to the second sheet: but that is as far as it goes. Any other ideas?![]()
ActiveCell.Value = Sheets("CoA").Range(CellAddress).Value
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks