Exporting to XML
-
I am using VBA Excel 2003 I have the following code within a module: ActiveWorkbook.XmlMaps("config_Map").Export URL:= _ "C:\TextXML.xml" It works great....ONCE. If the file does not exist, it works exactly like I want it to. However, if the file DOES exist, it throws this run-time error: Method 'Export' of object 'XmlMap' Failed How can I get this to overwrite the existing file? Thanks in advance. P
-
I am using VBA Excel 2003 I have the following code within a module: ActiveWorkbook.XmlMaps("config_Map").Export URL:= _ "C:\TextXML.xml" It works great....ONCE. If the file does not exist, it works exactly like I want it to. However, if the file DOES exist, it throws this run-time error: Method 'Export' of object 'XmlMap' Failed How can I get this to overwrite the existing file? Thanks in advance. P
PHDENG81 wrote: ActiveWorkbook.XmlMaps("config_Map").Export URL:= _ "C:\TextXML.xml" Tell there is a second, optional, parameter that specifies whether to overwrite the file or not. If not specified, it defaults to False, which is no overwrite.
ActiveWorkbook.XmlMaps("config_Map").Export URL:= "C:\TextXML.xml", Overwrite := True
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
PHDENG81 wrote: ActiveWorkbook.XmlMaps("config_Map").Export URL:= _ "C:\TextXML.xml" Tell there is a second, optional, parameter that specifies whether to overwrite the file or not. If not specified, it defaults to False, which is no overwrite.
ActiveWorkbook.XmlMaps("config_Map").Export URL:= "C:\TextXML.xml", Overwrite := True
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome