Here's the code giving me trouble ... The line in red... DateArray() subscript giving problems but can't figure it out...
Any advice is appreciated. ThanksPlease Login or Register to view this content.
Here's the code giving me trouble ... The line in red... DateArray() subscript giving problems but can't figure it out...
Any advice is appreciated. ThanksPlease Login or Register to view this content.
What is the value of counter?
May the the for loop trying to assign a value to a DateArray() more than the assigned counter value
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
You can check a couple of things:
what is the value of LastCell?
Are the named range in column B? If not, you get an error on this line .Offset(i, -1).Value.
What is the value of counter?
The Value of Counter is 3 in this case and will neve rbe more than LastCell anyway. I am printing ".Offset(i, -1).Value" and that prints fine...
Solved It -- apparently you cannot use the same variable for external loop if the number of elements are different - which makes sense So I used an internal counter of sort to increment "DateArray" and then it worked fine -- something like
Please Login or Register to view this content.
Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED",as per our Forum Rule #9. I will do it for you this time.
In future, to mark your thread as Solved, you can do the following -
Select Thread Tools-> Mark thread as Solved.
Incase your issue is not solved, you can undo it as follows -
Select Thread Tools-> Mark thread as Unsolved.
Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks