View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
R Tanner R Tanner is offline
external usenet poster
 
Posts: 87
Default Saving the contents of a worksheet table to an xml document when theuser closes the workbook.

How do you save the contents of a worksheet to an xml document when a
user closes the workbook. My first attempt was the following, but it
didn't work...

If ActiveWorkbook.Close Then
MsgBox "Would you like to close the workbook?", vbOKCancel
ActiveWorkbook.XmlMaps("dataroot_Map").Export URL:="Q:\Workforce
\Test.xml"
Sheets("Daily Workforce Data").Range("K1").Value = "=now()"
End If