Hey everyone,
I'm trying to tweak a VBA code I've been using for a couple of years, and thought it would be pretty simple...but for some reasons, I can't seem to make it work.
I'm using this procedure to retrieve stock data from a website. Basically, it goes through a table where I have a bunch of different URLs (llisted in column L). If currently maked as being active (an "X" in column K), it first makes sure to clear the previous data contained in columns R:AF and then returns 14 different values in columns R:AE. Column AF is a Timestamp I added (a basic NOW function), so it's not coming from the website. Now that part works fine.
What I'm trying to achieve is to copy values from AW:AY to AZ:BB before it clears the data, using the same criterias ("X" in column K, column L <> "").
I've tried a bunch of different things, but they pretty much ended with the same result; the .copy and .pastespecial are working, but as soon as the copy/paste is complete, my refresh counter stays stuck at 1 of #### and nothing moves.
Here's the code I'm using:
I tried to tweak the 'copie et efface contenu information' part toPlease Login or Register to view this content.
...and a bunch of other things. I tried having two different FOR at the beginning, one that would first copy/paste the data, then a second one that would clear the data, didn't work. Also tried to move the 'copie et efface' part where the "For i" is (it's force a delay so that we won't get timedout by the site). Again didn't work. Did some test with Application.ScreenUpdating too...didn't solve the issue.Please Login or Register to view this content.
One thing to note, it does seem to work with a smaller size table or selection (ie. less "X" in column K). But when finished, that table should be about 7,000 rows long...and we need to be able to refresh the whole table at night. But right now, it just seems like this is too much for Excel to handle.
Any ideas ?
Sample file is attached, VBA is in Module "REFRESH" if someone is willing to take a look.
There's a button on the TEST tab and another one on the REFRESH tab (at the top, near column AA)
Thanks !
Bookmarks