Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to open a file on my network drive that is in HTML format, then select all, copy all and paste into my excel workbook. How can I do this in a macro?

share|improve this question
What version of Excel are you using? – jrc03c Jul 21 '10 at 14:51

The best bet would be - instead of using a macro - to set Excel to constantly or manually poll a data source for info. For instance, in Excel 2007, you'd click on the "Data" tab and choose to get external data "From Text". In the "Import Text File" dialog, navigate to the folder you want, choose "All Files" from the file type drop-down box, and select your HTML document. Walk through the steps of the "Text Import Wizard" and click "Finish". On the "Import Data" dialog, click on "Properties" (you can also do this after the setup is complete) and deselect the "Prompt for file name on refresh" checkbox. If you want, you can also set an automatic poll of the data in the "Refresh every __ minutes" checkbox. Finally, click "OK" and "OK". You're done!

To manually refresh, click the "Refresh All" button up top. Good luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.