I Have below code which gives me error "Option Strict On disallows narrowing from type "Option Strict On disallows narrowing from type 'Object' to type 'String' in copying the value of 'ByRef' parameter 'varExpression' back to the matching argument." Please note that I don't want to turn option strict OFF. below is the code.
clsDataElemMaintRowXMLDataSet.SetFieldText(TAG_FLD_DEM_AMT, IIf(IsNumeric(strAmt), IIf(blnNegativeAmt, "-", "+"), EMPTY_STRING) &
Format_Renamed(strAmt, MASK_CURRENCY))
these are the declaration for the above code.
Dim clsDataElemMaintRowXMLDataSet As "someclass object"
Public Sub SetFieldText(strFieldName As String, strFieldText As String)
Private Const TAG_FLD_DEM_AMT As String = "DEMAmt"
ByVal blnNegativeAmt As Boolean
Public Const MASK_CURRENCY As String = "$#,##0.00"
ByVal strAmt As String
ByVal blnNegativeAmt As Boolean
Public Function Format_Renamed(ByRef varExpression As Object, ByRef
Optional strFormat As String = "", ByRef Optional vbFirstDayOfWeek As
FirstDayOfWeek = FirstDayOfWeek.Sunday, ByRef Optional
vbFirstWeekOfYear As FirstWeekOfYear = FirstWeekOfYear.Jan1) As
String