Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit existing data, userform, excel

Status
Not open for further replies.

jgs900

Programmer
Jul 29, 2007
3
US
I have a userform from which I can input data into a spreadsheet table, scroll through data, or use a Next or Previous command button. I want to add an Edit command button but don't know how to identify the current row of the data shown in the form from a seperate Edit macro.

Hope this isn't too elementary. Thanks for any elp.
 
we would need to see how the data is populated into the form before we can advise on how to find that row of data in a spreadsheet

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
thanks for looking at it, Geoff

I have NAMES in ,say, column A; ADDRESS in column B, etc. When the userform opens, the TextboxNAMES shows what is in cell A1, and TextboxADDRESS shows what is cell B2. Using the Next commandbutton, I can show the NAMES and ADDRESSES that are in row 2, row 3, etc. Using he Prevous commandbutton, I can go up.

What I am looking for is a direct way to edit the names, addresses, etc for a row that is currently being shown in the user form and insert the edited information back into the proper row. When I go to the macro for the Edit commandbutton, I don't know if the NAME currently shown is in Row 3 or Row 10.

I other words, I am looking for a way to identify the address of the information currently shown in the user form.
Thanks
 
Well - the data must get INTO the userform somehow.....that is what we need to know - how is the data getting into the userform - what is the code that populates it? Once we know how it is populated, we can suggest ways of being able to find out the row that it is being populated from...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Never mind. I had a brain freeze. Problem solved. Thanks agian for the response.
 
I am also looking for a solution to a similar problem. The data is already populated in the spreadheet, and I'd like to open a UserForm to display, scroll through rows, and edit cells in that row. Any simple examples would help.
 



SeaMcD1,

Please post your question in a new thread.

Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top