Hi I am importing data from an existing xml file to an Excel I want the imported data to be stored in Sheet2 and not this.workbook
Sub ImportXMLtoList()
Dim strTargetFile As String
Application.DisplayAlerts = False
strTargetFile = "C:\Users\pritam.panda\Documents\Visual Studio 2012\Projects\LinqDemo1\LinqDemo1\bin\LinqDemo1.XML"
Workbooks.OpenXML Filename:=strTargetFile, LoadOption:=xlXmlLoadImportToList
Application.DisplayAlerts = True
End Sub
I am using the above code in a module as I have an image in this.workbook I want it to be saved in sheet2 . Please suggest a work-around. Thanks in advance
No comments:
Post a Comment