Hello! I wrote a code that sometimes it runs fine and sometimes it do not get the values. I'd like to know what I'm doing wrong.
Please Login or Register to view this content.
Hello! I wrote a code that sometimes it runs fine and sometimes it do not get the values. I'd like to know what I'm doing wrong.
Please Login or Register to view this content.
what do you mean by it does not get values? can you post the line(s) of code that are causing the issue(s)?
Hi, tks for helping! This code should get values from a workbook and print in other. Sometime it does print the values and sometimes not. I do belive the errors must be in this lines
Please Login or Register to view this content.
what's the issue? the autofill lines? or this?
have you stepped through the routine when it doesn't produce what you want? you step line by line via the F8 key.Please Login or Register to view this content.
The autofill I suppose. When I do step by step it works properly.
that doesn't make sense. if you stepped through it, one line at a time, then obviously that was a time that it was working for you. you said yourself that sometimes it works, sometimes it doesn't. so, can you replicate the error and tell us when it fails? what did you do at that time? any special happenings during that time?
I don't know. Looks like the vba didn't finish to execute the loops before go to next step. This are the images when the code fails and when it works. Attachment 699499Attachment 699500
i can view those images. upload them a different way.....this is what i see:
Works.jpg
Don'r work.jpg
I do belive the autofill is the problem, but I dont know why. In the image "works" autofill corectly get the values from other sheet, when it does no work, it only selects the place where the values should
appear
I solved the problem, thanks for the help!
I do belive the problem was in the first line of this code. I just put the third line in the beggining of the code. As the code starts with the command ActiveCell, it requires an active cell on the worksheet, so, as I didn't select any cell, my autofill was only selecting my parameter, whitout do anything. Not sure the concepts I deduced are right, but the code is running fine now.Please Login or Register to view this content.
nice job. good luck
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks