using VBA to clear old data and import new

I need help programing code to do the following on Button_Click.
1. Clear an excell sheet called "Data"
2. Prompt the user to browse to and select a .xml file
3. Place the content of that file into the sheet called "Data"
4. Refresh the sheet called "Pivot Table"

Steps 1 and 2 i have figured out, but every time instead of putting the data into the exsisting sheet "Data" it opens a new excel window.

AttachmentSize
Andrews_2.xlsx42.64 KB
Vishesh's picture

Please attach your sample

Please attach your sample file to modify.

The file has been uploaded.

The file has been uploaded.