I need to include some VBA functions in an Extra! macro. I have tried to use the code below, but it will not compile. I think it has to do w/ the Optional key word. Can this not be used in Extra!???
Code:
Declare Function Replace Lib "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL" Alias "ReplaceA" (Expression As String, Find As String, Replace As String, Optional Start As Long = 1, Optional Count As Long = -1, Optional Compare As VbCompareMethod = vbBinaryCompare) As String
Code:
Declare Function Replace Lib "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL" Alias "ReplaceA" (Expression As String, Find As String, Replace As String, Optional Start As Long = 1, Optional Count As Long = -1, Optional Compare As VbCompareMethod = vbBinaryCompare) As String