Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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
IF function to grab data mike Excel Worksheet Functions 1 February 25th 09 02:22 AM
Excel vb help: How to grab the right Data [email protected] Excel Programming 0 August 23rd 05 12:12 PM
Grab matching data and populate? Fletcher Excel Worksheet Functions 1 December 22nd 04 03:26 PM
Grab Last Name data within Title and Name vamosj Excel Programming 1 October 29th 04 04:34 AM
Format of textbox on userform and correct result Mark Excel Programming 1 July 13th 04 02:49 PM


All times are GMT +1. The time now is 08:22 PM.

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

About Us

"It's about Microsoft Excel"