excel - VBA - Syntax of the SaveAs-Method -
implementing filefilter parameter 1 has use comma-separated pairs of describer followed file extension.
<pre>filename = _ application.getsaveasfilename( _ initialfilename:="my_file", _ filefilter:="text file (*.txt), *.txt, _ xml file (*.xml), *.xml")</pre>
i have played method. file-extension determined extension in parenthesis.
so, what's purpose of file-extension after comma? in code-example *.txt , *.xml.
the piece of text before comma shown in file filter drop down menu; extension after comma actual extension used filter when appropriate menu option selected.
in case, 2 menu options text file (*.txt)
, xml file (.xml)
. when selected, use .txt
, .xml
respectively filter visible options.
from documentation:
this string passed in filefilter argument consists of pairs of file filter strings followed ms-dos wildcard file filter specification, each part , each pair separated commas. each separate pair listed in files of type drop-down list box.
Comments
Post a Comment