This was posted a few years ago but never resolved. I have a web connection that retrieves data from the company website.
Currently this is the code I use to clear, but it also removes the link
I have also tried:
After running the link, I copy the information into another worksheet. I need to be able to copy it without the connection or it will not copy and paste. So, copy data only, no query link content.
If I try to run again for the next instance, the link is not there. I have to close, without saving, reopen and hope the link is there. There must be a way to clear the contents but leave the link intact.
Code:
ActiveWorkbook.Connections("my_Connection").Refresh
Currently this is the code I use to clear, but it also removes the link
Code:
ActiveSheet.QueryTables("Item_BOM.php?rand=1464103285&mitm=[""PARTNO""]") _
.Delete
I have also tried:
Code:
For Each Cn In ActiveSheet.QueryTables
Cn.Clear
Next Cn
After running the link, I copy the information into another worksheet. I need to be able to copy it without the connection or it will not copy and paste. So, copy data only, no query link content.
If I try to run again for the next instance, the link is not there. I have to close, without saving, reopen and hope the link is there. There must be a way to clear the contents but leave the link intact.