What line causes the error in the code that failed?
ken4capitola wrote:
>
> Hi Dave,
>
> The scratch sheet I'm using have all blanks. In the US regional setting
> your program runs successfully. In Dutch, I'm getting Run-time error
> '1004': Application-defined or object-defined error.
>
> BTW, what I implemented in my code is shown below. The quantities
> within the IF expression are complex so I wanted to stay as close to
> the original IF syntax as possible. The Replacement string operation
> changes a target pattern "\," with either a ";" or "," depending on the
> region.
>
> sub test
> Dim ListSep As String
> Dim BackComma As String
> BackComma = "\,"
> ListSep = Application.International(xlListSeparator)
>
> '****** y = Array("hello", "=if(x,0,0)") becomes ....
>
> y = array("hello", _
> Replace("=IF(x \, 0 \, 0 ", BackComma, ListSep)
> end
--
Dave Peterson
Bookmarks