Hi,

I am not very familiar with VBA, and still on the learning curve. I am using Excel 2007 on Windows 7.

I am looking for VBA code for a button in excel that does the following:

a. Test the active worksheet and make sure it is a diagram or nested style.
b. Test if this particular worksheet's test file exists. If it doesn't then fail out because creating it is useless. The whole point is to take updated info from that file. If we create it then nothing is updated (filename = Globals.userFolder & "\test\" & Trim(s.Cells(1, 3)) & ".html")
c. If it exists then Open test file for reading, Read line at a time and do something with strText to process all tags get id, shape, and coords attributes from tag.
d. Find matching cell in worksheet. Include some logic to iterpolate which matching hotspot is correct in the event that there are multiple hotspots with the same name.
e. Use the old and new coordinates to see which are closer.
d. Update shape and coords cells for that row and close.

Note: I have already a button in excel which creates html files taking data from the excel under the folder : Globals.userFolder & "\test\".

Thanks in advance. Please let me know if something is unclear.