Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default how can i re-populate a userform with data already entered?

I have many lines of data and would like to use the input form to recall the
data based on a search so that i can re-enter incorrect data. I have limited
VBA experience
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,365
Default how can i re-populate a userform with data already entered?

Paul,
When you say "input form" are you actually talking about the gray box type
user forms that have text/numeric entry areas on them and maybe a command
button that causes the entered information to be put onto a worksheet?

If that's the case, you can use that form as a template for another to
reverse the operation kind of. I do something similar with a file, and
rather than get complicated with searches and such, I have a text entry box
at the top of the form that asks for the row number that the information to
be edited is in on the sheet. The user enters that number and click a
command button, and the code then uses that row number to get the
information, kind of like this:

Sub CommandGetOldData_Click()
Me!textName = ActiveSheet.Range("A" & txtRowEntered).Value
Me!txtWage = ActiveSheet.Range("B" & txtRowEntered).Value
'... get all of the existing information from a row into the form's text boxes
End Sub

Then at the bottom, there is another button that when they click it takes
all of the information, changed or not on the form, and puts it back onto the
worksheet:
Sub CommandUpdateWithEdits_Click()
ActiveSheet.Range("A" & txtRowEntered).Value = Me!textName.Text
ActiveSheet.Range("B" & txtRowEntered).Value = Me!txtWage.Text
'...continue replacing old with new
End Sub

Let me know if I can help any more.
"Paul Dye" wrote:

I have many lines of data and would like to use the input form to recall the
data based on a search so that i can re-enter incorrect data. I have limited
VBA experience

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
Manual control of link updating for downloaded quotes? dk_ Excel Discussion (Misc queries) 9 November 15th 06 01:04 PM
?-Change data series range as data is entered? isofuncurves Charts and Charting in Excel 4 January 24th 06 06:15 PM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
UserForm Data to Spreadsheet Andy Tallent Excel Discussion (Misc queries) 2 June 22nd 05 04:51 PM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM


All times are GMT +1. The time now is 09:51 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"