Hi
this is my first time here. Hope someone could help me with my querries.
I want to create a vb that i will check first if the records is already exist before adding it to the worksheet
If the record already exist it will prompt a message "record already exist"
Then if click Yes it will continue to add
If No return to the worksheet.
All i have is this.
Private sub commandbutton_click()
Dim lastrow as object
Set lastrow = sheet1.range("a65536").end(xlup)
Lastrow.offset (1,0).value = txtdate.text
Lastrow.offset (1,1).value = txtpodate.text
Lastrow.offset (1,2).value = txtprefix.text
Lastrow.offset (1,3).value = txtcurrency.text
Lastrow.offset (1,4).value = txtamount.text
Unload me
End sub
Ty.
this is my first time here. Hope someone could help me with my querries.
I want to create a vb that i will check first if the records is already exist before adding it to the worksheet
If the record already exist it will prompt a message "record already exist"
Then if click Yes it will continue to add
If No return to the worksheet.
All i have is this.
Private sub commandbutton_click()
Dim lastrow as object
Set lastrow = sheet1.range("a65536").end(xlup)
Lastrow.offset (1,0).value = txtdate.text
Lastrow.offset (1,1).value = txtpodate.text
Lastrow.offset (1,2).value = txtprefix.text
Lastrow.offset (1,3).value = txtcurrency.text
Lastrow.offset (1,4).value = txtamount.text
Unload me
End sub
Ty.