Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default find and update

I have created a user form that will put information into a
spreadsheet into the next available row. I am now trying to create a
function in that same userform that allows me to search a criteria and
to update that same userform with the information allready entered
previosly. once I find that information I want to be able to submit
the data back into the spreadsheet without creating a duplicate.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default find and update

While the UserForm can have its own click event, it is normally used as
a container for other controls such as command buttons, list boxes,
combo boxes and other controls from the control tool box. Having said
that, you can use a couple of methods to do what you describe:

For Each cell In myRange
If cell = mySearchCriteria Then
myControl.Value = cell.Value '<<adds to control on form
End If

Or

With myRange
Set c = .Find(mySearchCriteria, LookIn:=xlValues)
If Not c Is Nothing Then
sRng = c.Address
myContolValue = Range(sRng).Value '<<Adds to control on form
End If
End With

As for the part about submitting it back to the spreadsheet without
creating a duplicate...I guess I don't understand what you mean.




"Keith Teeter" wrote:

I have created a user form that will put information into a
spreadsheet into the next available row. I am now trying to create a
function in that same userform that allows me to search a criteria and
to update that same userform with the information allready entered
previosly. once I find that information I want to be able to submit
the data back into the spreadsheet without creating a duplicate.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace Vs Update Values In DOUG ECKERT[_2_] Excel Worksheet Functions 0 March 3rd 08 03:29 PM
find, replace, update links cinvic Excel Discussion (Misc queries) 0 December 15th 06 02:01 PM
Excel 2K3 Macro - Find and Update kdub-u Excel Worksheet Functions 2 August 30th 06 07:14 PM
Find and Update Macro hnyb1 Excel Discussion (Misc queries) 2 October 11th 05 03:30 PM
Find and Update with User Form prodsched[_7_] Excel Programming 0 May 18th 04 03:35 PM


All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"