none
!Runtime error "9" Subscript out of range !Help Please

    Pertanyaan

  • Private Sub DataGrid1_Click()
    If DataGrid1.Row > -1 Then
        If MsgBox("Apakah Data obat dengan ID " & DataGrid1.Columns(0).Text & "" _
            & "akan dirubah . .?", vbInformation + vbOKCancel) = vbOK Then
            TextIDObat.Text = DataGrid1.Columns(0).Text
            TextJenisObat.Text = DataGrid1.Columns(1).Text
            TextNamaObat.Text = DataGrid1.Columns(2).Text
            TextDeskripsi.Text = DataGrid1.Columns(3).Text

            HargaBeli.Text = DataGrid1.Columns(4).Text

           TextQty.Text = DataGrid1.Columns(5).Text
            HargaJual.Text = DataGrid1.Columns(6).Text
            TextExpired.Value = DataGrid1.Columns(7).Text
            CmdHapus.Enabled = True
            CmdSimpan.Enabled = True
            CmdBaru.Caption = "&Batal"
            TextJenisObat.Enabled = True
            TextNamaObat.Enabled = True
            TextDeskripsi.Enabled = True
            HargaBeli.Enabled = True
            TextQty.Enabled = True
            TextExpired.Enabled = True
            HargaJual.Enabled = True
            TextJenisObat.SetFocus
            Call TampilDgObat
        End If
    End If
    End Sub

    12 April 2017 4:59

Semua Balasan