ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   strange behaviour (https://www.excelbanter.com/excel-programming/428511-strange-behaviour.html)

sunilpatel

strange behaviour
 
D$ = FORMAT(Date, "dd-mmm-yy") & Chr$(10)

this statement worked fine in one workbook but now does not work. "wrong
number of arguments or invalid property error is returned"
The word Format is highlighted and stays in capitals. In another workbook
Script editor accepts the "FORMAT" and it becomes "Format", and works fine.

This occured after i changed a cells date format on a particular worksheet.

Is this a bug ?



smartin

strange behaviour
 
sunilpatel wrote:
D$ = FORMAT(Date, "dd-mmm-yy") & Chr$(10)

this statement worked fine in one workbook but now does not work. "wrong
number of arguments or invalid property error is returned"
The word Format is highlighted and stays in capitals. In another workbook
Script editor accepts the "FORMAT" and it becomes "Format", and works fine.

This occured after i changed a cells date format on a particular worksheet.

Is this a bug ?



A guess... DATE is a reserved word (a function). Suggest you change the
name of this variable.


All times are GMT +1. The time now is 02:09 AM.

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