Hello everyone,
first off thanks for all the posters who have unknowingly helped me with my excel vba experiments and projects thus far. I am slowly but surely building my VBA skills with all the useful info on this site.....but now im stuck and am appealing for help :D
I have a workbook with a xml map build in it which works great. I know how to import it manually, but would like to be able to import with vba code to simplify the operation for the masses.
the file path will always be on the desktop, but the NT login will change for each user.
I have a function built =Getdesktop() which successfully and correctly gets the users desktop.
File name to be opened is defined by a cell in the worksheet
concatenate function gives me the full file path e.g."C:\Users\joebloggs\desktop\INPLACE.xml"
the following code works for importing the file path above.
Sub import_file()
'
' import_file Macro
' import xml file
ActiveWorkbook.XmlMaps("LTI template").Import URL:= _
"C:Users\joebloggs\desktop\INPLACE.xml"
End Sub
can anyone point me in the right direction for substituting the fixed file path in the code for a file path derived from a named range in the workbook.
Regards,
Stu
first off thanks for all the posters who have unknowingly helped me with my excel vba experiments and projects thus far. I am slowly but surely building my VBA skills with all the useful info on this site.....but now im stuck and am appealing for help :D
I have a workbook with a xml map build in it which works great. I know how to import it manually, but would like to be able to import with vba code to simplify the operation for the masses.
the file path will always be on the desktop, but the NT login will change for each user.
I have a function built =Getdesktop() which successfully and correctly gets the users desktop.
File name to be opened is defined by a cell in the worksheet
concatenate function gives me the full file path e.g."C:\Users\joebloggs\desktop\INPLACE.xml"
the following code works for importing the file path above.
Sub import_file()
'
' import_file Macro
' import xml file
ActiveWorkbook.XmlMaps("LTI template").Import URL:= _
"C:Users\joebloggs\desktop\INPLACE.xml"
End Sub
can anyone point me in the right direction for substituting the fixed file path in the code for a file path derived from a named range in the workbook.
Regards,
Stu