Yahoo Clever wird am 4. Mai 2021 (Eastern Time, Zeitzone US-Ostküste) eingestellt. Ab dem 20. April 2021 (Eastern Time) ist die Website von Yahoo Clever nur noch im reinen Lesemodus verfügbar. Andere Yahoo Produkte oder Dienste oder Ihr Yahoo Account sind von diesen Änderungen nicht betroffen. Auf dieser Hilfeseite finden Sie weitere Informationen zur Einstellung von Yahoo Clever und dazu, wie Sie Ihre Daten herunterladen.

how to do Arithmetic in a Visual Basic Datagridview?

I need to minus the data in one coluum from another and put the answer in the last coluum

1 Antwort

Relevanz
  • vor 1 Jahrzehnt
    Beste Antwort

    DataGridView1.Item("c", 0).Value = DataGridView1.Rows(0).Cells("a").Value - DataGridView1.Rows(0).Cells("b").Value

    Where "c", "b", and "a", are the column names, and the 0 is the row that we are looking at.

    You will want to put some validation in with this so your not trying to subtract strings from each other.

Haben Sie noch Fragen? Jetzt beantworten lassen.