ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why doesn't this code compile? (https://www.excelbanter.com/excel-programming/339538-why-doesnt-code-compile.html)

keithb

Why doesn't this code compile?
 
This code:

ActiveWorkbook.SaveAs XlSaveAsAccessMode:=xlExclusive

returns the Compile Error "Named Argument Not Found."

Why?



Norman Jones

Why doesn't this code compile?
 
Hi Keith,

Try:

ActiveWorkbook.SaveAs AccessMode:=xlExclusive


---
Regards,
Norman



"keithb" wrote in message
...
This code:

ActiveWorkbook.SaveAs XlSaveAsAccessMode:=xlExclusive

returns the Compile Error "Named Argument Not Found."

Why?




Dave Peterson

Why doesn't this code compile?
 
ActiveWorkbook.SaveAs AccessMode:=xlExclusive

xlsaveasaccessmode represents one of those constants.

keithb wrote:

This code:

ActiveWorkbook.SaveAs XlSaveAsAccessMode:=xlExclusive

returns the Compile Error "Named Argument Not Found."

Why?


--

Dave Peterson

Matt Williamson

Why doesn't this code compile?
 
Try ActiveWorkbook.SaveAs AccessMode:=xlExclusive

HTH

Matt

"keithb" wrote in message
...
This code:

ActiveWorkbook.SaveAs XlSaveAsAccessMode:=xlExclusive

returns the Compile Error "Named Argument Not Found."

Why?





All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com