View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Form based on rows

It is exactly the opposite of putting the data in sheet 2. Put a button on
sheet two and reverse the code

from:
sheets("Sheet2").Range("A1") = sheets("Sheet1").Range("A1")

to:
sheets("Sheet1").Range("A1") = sheets("Sheet2").Range("A1")

You may want to get the active row number on sheet2
MyRow = sheets("Sheet2").activecell.row
sheets("Sheet1").Range("A1") = sheets("Sheet2").Range("A" & MyRow)


"Ixtreme" wrote:

I have created a fancy sheet1 in which a user can input data. On that
sheet1 I have added a button. If I click on it, the contents of the
spreadsheet is copied to another sheet2 where each column represents a
field from sheet 1. So each time the user click that button, the
record is saved to that sheet2. As a result I have many records.

I would like to have the ability to recreate the first sheet with the
data from sheet2. So if the users select a record, the contents of
that record will be displayed with all its data in sheet1 populated in
a fancy way. How can I do that the best way?