Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform to grab,correct and restore data
Hi all
I have a userform that stores data (1 row record with 20 columns) to a worksheet.Is there a way to grab the data back in (other or the same)userform, ambent(correct) data and store them back in the same row in the worksheet? An example or code will be appreciated.Thanks anyway for your attension... or help. P.S. The userform contains 20 textboxes and 1-2 listboxes.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform to grab,correct and restore data
Can you pick out a key column that contains the unique key for that row?
then you could look at that column, look for a match with one of your textbox values, and determine the row. dim res as variant dim myRng as range with worksheets("sheetnamehere") set myrng = .range("a1", .cells(.rows.count,"A").end(xlup)) res = application.match(me.textbox1.value, myrng, 0) if iserror(res) then 'no match, new record to add???? else msgbox "match was found in row: " & res with myrng(res) .offset(0,1).value = me.textbox2.value .offset(0,2).value = me...... end with end if (Untested, uncompiled) jimapos wrote: Hi all I have a userform that stores data (1 row record with 20 columns) to a worksheet.Is there a way to grab the data back in (other or the same)userform, ambent(correct) data and store them back in the same row in the worksheet? An example or code will be appreciated.Thanks anyway for your attension... or help. P.S. The userform contains 20 textboxes and 1-2 listboxes.. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF function to grab data | Excel Worksheet Functions | |||
Excel vb help: How to grab the right Data | Excel Programming | |||
Grab matching data and populate? | Excel Worksheet Functions | |||
Grab Last Name data within Title and Name | Excel Programming | |||
Format of textbox on userform and correct result | Excel Programming |