The -4143 is the constant for xlworkbooknormal which I suspect means the version of excel you are working with. Leaving the parameter off would get the same results. Yo ucan also specify an version of excel, csv file, xml, ...
what I usually recommend is to use the object browser in the VBA window of excel select menu View - Object Browser. there is a search box to the left of the Binocular ICON. Type in this box "SAVEAS" and press binoculas to perform a search of
the active libraries definitions. then select the row with Excel - Workbook - SAVEAS.
You will see in one of the windows the parameter list for the SAVEAS subroutine. You will see the 2nd parameter is FileFormat. Not perform a search with "Fileformat". then select the row with Excel xlfileformat. the member window
will list all the constants that can be used for the Fileformat parameter. Clicking each of the constants like xlworkbooknormal (-4143 &HFFFFEFD1) will display the value of the constant in the window at the bottom of the screen. Usually the
-4000 values are the default value of the parameter.
Marked as answer byDevNCMonday, November 29, 2010 3:19 AM