Tomas Duarte Posted March 9, 2020 at 08:45 PM Report Share #617532 Posted March 9, 2020 at 08:45 PM Ola, alguém me poderia ajudar estou a passar um programa de visual Basic 2019 para Visual Basic 2010 Criei uma class e coloquei la dentro um modulo e está me a dar erro no seguinte codigo: Dim bs As New BindingSource bs.DataSource = dtFATURA bs.Filter = "ID_ENTREGA =" & FATURA xlivro.Range("B5").Value = FATURA xlivro.Range("B6").Value = DATA xlivro.Range("B8").Value = CLIENTE xlivro.Range("B7").Value = MORADA For Each view As DataRowView In bs Dim row = view.Row CODIGO = row("CODIGO") PRODUTO = row("PRODUTO") QUANTIDADE = row("QUANTIDADE") PESO = row("PESO") TOTAL = row("TOTAL") xlivro.Range("A" & RANGO).Value = CODIGO xlivro.Range("B" & RANGO).Value = PRODUTO xlivro.Range("C" & RANGO).Value = QUANTIDADE xlivro.Range("D" & RANGO).Value = PESO xlivro.Range("E" & RANGO).Value = TOTAL xlivro.Range("F" & RANGO).Value = QUANTIDADE * TOTAL TotalFacturado = TotalFacturado + (QUANTIDADE * TOTAL) RANGO += 1 Next No "for Each view as DataRowView In bs " Da o seguinte erro "Error 1 Expression is of type 'Reportes.BindingSource', which is not a collection type." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now