Populate selected row from form

JenniferN

New Member
Joined
Dec 19, 2007
Messages
44
Hi,

Thought it was better to start a new thread than to continue the old one since the focus in that thread was to get the values into a form and the question this tme is to get the values back into the correct row.

Background. My little application does the following...
In Form1 the user adds information that is inserted as a new row in my excel sheet. A unique ID is created and inserted in column A.
In Form2 the user sees a listbox with the rows in the excel sheet. The user then selects one of the rows and get all the information including the ID displayed to him/her in Form3.
In Form3 the user should then be able to update the values (except the ID) and then the values should be inserted back into the excel sheet in the correct row. I suppose I need the code behind my OKbutton to say something like

If Column A = value of IDBox, insert values in columnB, columnC etc...
But how do I write this code correctly? :confused:
 
Hi,

Thought it was better to start a new thread than to continue the old one since the focus in that thread was to get the values into a form and the question this tme is to get the values back into the correct row.

Background. My little application does the following...
In Form1 the user adds information that is inserted as a new row in my excel sheet. A unique ID is created and inserted in column A.
In Form2 the user sees a listbox with the rows in the excel sheet. The user then selects one of the rows and get all the information including the ID displayed to him/her in Form3.
In Form3 the user should then be able to update the values (except the ID) and then the values should be inserted back into the excel sheet in the correct row. I suppose I need the code behind my OKbutton to say something like

If Column A = value of IDBox, insert values in columnB, columnC etc...
But how do I write this code correctly? :confused:

Explain what exactly you want to do, so that we may need to change whole code that you already have ...
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top