Searching Data
-
Dear all, I'am trying to build a search program using Excel 2003 Macro, i have trouble when i click this command always shown this message : "Run Time Error '1004': Application-defined or object-defined error". Need your help to check where the wrong syntax code of my program,
Private Sub cmdCari_Click()
Set wsDtbsCont = Sheets("DataContainer")
Set rgDtbsCont = wsDtbsCont.Range("DataContainer")
Set c = rgDtbsCont.Find(txtContNo.Value, LookIn:=xlValues)
txtCarrier.Value = c.Offset(0, 1).Value
cmbForwarder.Value = c.Offset(0, 2).Value
txtSeal.Value = c.Offset(0, 3).Value
txtStatus.Value = c.Offset(0, 4).Value
txtArrivalTime.Value = c.Offset(0, 5).Value
txtStuffingTime.Value = c.Offset(0, 6).Value
txtSealTime.Value = c.Offset(0, 7).Value
txtFreeTime.Value = c.Offset(0, 8).Value
txtOverNight.Value = c.Offset(0, 9).Value
End Subthank you for every things..
Best Regards, Ahmad Rifai Yusuf
-
Dear all, I'am trying to build a search program using Excel 2003 Macro, i have trouble when i click this command always shown this message : "Run Time Error '1004': Application-defined or object-defined error". Need your help to check where the wrong syntax code of my program,
Private Sub cmdCari_Click()
Set wsDtbsCont = Sheets("DataContainer")
Set rgDtbsCont = wsDtbsCont.Range("DataContainer")
Set c = rgDtbsCont.Find(txtContNo.Value, LookIn:=xlValues)
txtCarrier.Value = c.Offset(0, 1).Value
cmbForwarder.Value = c.Offset(0, 2).Value
txtSeal.Value = c.Offset(0, 3).Value
txtStatus.Value = c.Offset(0, 4).Value
txtArrivalTime.Value = c.Offset(0, 5).Value
txtStuffingTime.Value = c.Offset(0, 6).Value
txtSealTime.Value = c.Offset(0, 7).Value
txtFreeTime.Value = c.Offset(0, 8).Value
txtOverNight.Value = c.Offset(0, 9).Value
End Subthank you for every things..
Best Regards, Ahmad Rifai Yusuf
The range definition looks stange to me, can you use select all or something like that? I m assuming that your sheet actually excist though, or?
-
The range definition looks stange to me, can you use select all or something like that? I m assuming that your sheet actually excist though, or?
Dear Kenneth, The sheet actually exist, i'am trying to search data with cmdCari Command Button with where the key is in txtContNo Text Box, Actually i was interested use select or other SQL Statement, but don't have any references. Do you / any guys have it. Coz i really need it
Best Regards, Ahmad Rifai Yusuf