View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
stevebriz stevebriz is offline
external usenet poster
 
Posts: 195
Default Question on Find method in vba

How do you mean check for any modifcations??
once you get the value into you form from the data sheet and then
modifiy it through your form on what sheet are you writing the changes
to?
If you write a on separate sheet then you preserve the original "data"
sheet.



Jade wrote:
Hello Everyone,

I'm working on a userform which gathers the user's input and dumps the
data into a spreadsheet. There is a portion in my code which if the
data is already supplied I use the find method to locate and reinsert
the data in the form. However; in testing it , I realize that I have
to modify it in a way that it doesn't add the data pulled as a new
record when updated and checks for any modifications and if any were
made to keep that data vs. the original version.


Dim rngFind As Range
Set rngFind =
Worksheets("Data").Range("D1:d500").Find(Me.txtBox .Value,
Lookat:=xlWhole)

If rFind Is Nothing Then
MsgBox "Data has not been entered.", vbInformation
Else
Me.txtDes = rngFind.Offset(0, 1).Value
Me.cmbCon = rngFind.Offset(0, -1).Value

If anyone has any suggestions/guidance, I'd appreciate it.

Regards,
Jade