Chamuanza Posted December 1, 2023 at 09:41 AM Report Share #632286 Posted December 1, 2023 at 09:41 AM (edited) Um Bem Aja a todos Tenho necessidade de fazer uma contagem das celulas a Amarelo da SaidosEuroDreamsDataGridView, mas não consigo, alguem me dê uma ajuda. Tenho este código no Private Sub frmGraficoPremiosEuroDream_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Conta os numeros do Premiados Dim yContagem(40) As Integer For i As Integer = 1 To 40 For Linhas = 0 To SaidosEuroDreamsDataGridView.RowCount - 1 For Colunas = 1 To 6 If SaidosEuroDreamsDataGridView.DefaultCellStyle.BackColor=??????? Then yContagem(i) += 1 End If Next Colunas For Colunas = 1 To 6 Next Colunas Next Linhas Next i Edited December 2, 2023 at 06:21 PM by Chamuanza Mostar Resolução Link to comment Share on other sites More sharing options...
Solution Chamuanza Posted December 2, 2023 at 06:23 PM Author Solution Report Share #632292 Posted December 2, 2023 at 06:23 PM For i As Integer = 1 To 49 For Linhas = 0 To frmApostasPremiadasTotoloto.DataGridView1.RowCount - 1 For Colunas = 1 To 5 If frmApostasPremiadasTotoloto.DataGridView1.Item(Colunas, Linhas).Value = i Then If frmApostasPremiadasTotoloto.DataGridView1.Item(Colunas, Linhas).Style.BackColor = Color.Yellow Then yContagem(i) += 1 End If End If Next Colunas Next Linhas Next i 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