Jan 4, 2011
"'I'm having an issue sorting out why my code isnt working. When I "step into" it line by line i can get it all to work exactly how I want, however when I actually run the macro i get an subscript error 9. The code basicly sets a .CSV url to a variable "CurrentURL". The code then launches this url which opens a .csv window called table.csv. I want to copy 2 columns off this window and paste it to another document called "MPT_CAPM_v1", then close table.csv. Here is my code the red line is where I believe I'm running into my error.'This macro opens a URL, copies and pastes the price data into the sheet
View 6 Replies
I think the error may be caused by the fact it takes about 4-5 seconds to open table.csv in excel, and my line of code is trying to select a window that isnt currently open. After I get the error message, table.csv opens up. I've tried Loops & Sleep functions to try to input a delay, but regardless it seems that table.csv will not open until the end of said loop or delay.