Hello all,

When trying to import an excel file (.xlsx) from the web to a local excel file on my computer, I have tried to set up a macro to automate this process. I recorded a macro using the "record macro" function, but when trying to import the .xlsx file, the URL was too long and Excel does not allow for such long URLs.

The URL in question is:

http://www.transelectrica.ro/widget/...let_excel=true

One solution which I thought of was to shorten the URL with tinyurl.com, which converted the URL to: http://tinyurl.com/qec5ycc . I then used this in the macro recording and it indeed worked. I then tried to substitute all instances of the tinyurl in the VBA code with the long URL, but the

Please Login or Register  to view this content.
was regarded as an invalid cell/argument.

Is there any way in which I can make this work? I need to have the whole URL, as in the end I plan to have an automated process with the URL changing every 10 seconds with the system clock (and thus refreshing the imported table every 10 seconds), so going through tinyurl every time is not an option.

Thank you for your time!