I spent a good while struggling with this because firefly is missguiding me,
if i make a mistake in a part of the code, firefly points to the wrong of the
code to "show" where the error resides. Here is some sample code:
'------------------------------------------------------------------------------------------------------------------------
Function FORM1_WM_CREATE ( _
hWndForm As Dword, _ ' handle of Form
ByVal UserData As Long _ 'optional user defined Long value
) As Long
Local Nombre As String
Local MyLong As Long
Local Flags As Long
Local Datos As String
Local Cod1 As String
Local Ingr As Double
MyLong = 1772661
Nombre = "Elias"
If (((Flags) And &h002) = &h002) Then
Datos = Datos & "Renta: " & $CrLf & _
"Fecha: " & Mid$(Str$(MyLong), 7, 2) & " de " & Mid$(Str$(MyLong), 5, 2) & " del " & Mid$(Str$(MyLong), 1, 4) & $CrLf & _
"Articulo: " & $Tab & Trim$(Nombre) & Trim$(Cod1) & $CrLf & _
"Ingresos: " & $Tab & Trim$(Format$(Ingr, "$ ###,.00#")) & $CrLf
ElseIf (((Flags) And &h004) = &h004) Then
Datos = Datos & $CrLf & _
"Devolucion: " & $CrLf & _
"Fecha: " & Mid$(Str$(MyLong), 7, 2) & " de " & Mid$(Str$(MyLong), 5, 2) & " del " & Mid$(Str$(MyLong), 1, 4)
"Articulo: " & $Tab & Trim$(Nombre) & Trim$(Cod1) & $CrLf & _
"Ingresos: " & $Tab & Trim$(Format$(Ingr, "$ ###,.00#")) & $CrLf
End If
End FunctionIt shows the line:
Quote"Articulo: " & $Tab & Trim$(Nombre) & Trim$(Cod1) & $CrLf & _
As the faulty one, but its ok... The real error resides in the other line,
if i remove the faulty part, like this:
'------------------------------------------------------------------------------------------------------------------------
Function FORM1_WM_CREATE ( _
hWndForm As Dword, _ ' handle of Form
ByVal UserData As Long _ 'optional user defined Long value
) As Long
Local Nombre As String
Local MyLong As Long
Local Flags As Long
Local Datos As String
Local Cod1 As String
Local Ingr As Double
MyLong = 1772661
Nombre = "Elias"
If (((Flags) And &h002) = &h002) Then
Datos = Datos & "Renta: " & $CrLf & _
"Fecha: " & Mid$(Str$(MyLong), 7, 2) & " de " & Mid$(Str$(MyLong), 5, 2) & " del " & Mid$(Str$(MyLong), 1, 4) & $CrLf & _
"Articulo: " & $Tab & Trim$(Nombre) & Trim$(Cod1) & $CrLf & _
"Ingresos: " & $Tab & Trim$(Format$(Ingr, "$ ###,.00#")) & $CrLf
ElseIf (((Flags) And &h004) = &h004) Then
End If
End Function The problem dissapears without modifying the code that firefly points to.
I am posting this because if not fixed, i might get this in the future and forget about this, resulting in more time used to spot the problem.
Thanx :)