L
Logan
I posted the following the other day:
I would like to start to build a database of persons
details within my workbook template.
My idea is that each time Sheet1 is filled out, the persons
details (ie Surname, Given, DOB, Address, etc.) populates
to a database sheet that is hidden sheet in the workbook.
When the person is done filling out this sheet it gets
saved as an xls in another folder. This done with a macro.
I would like the database sheet, with this persons details
to stay in the template and each time the template is used
it stores the persons details, thereby building the
database within the template.
In the future I would like to be able to query the database
prior to filling out the sheet to see if the person is in
the database. If the person is there I would like to import
their details in the sheet.
Is this possible. If so can anyone point me in the right
direction.
Mark had given me the following example:
Private Sub cbAdd_Click()
Dim lRows As Long
With Range("Database")
lRows = .Rows.Count + 1
Range("A2:AH2").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"
End With
End Sub
The problem is that the Input cells get filled from another
sheet, they are referenced to another sheet (ie
='Sheet1'!J4). Everytime I run Mark's example, all it does
is does is copy 'Sheet1'!J4 and change it to 'Sheet1'!J15
and place it into the Database table. Run it again it adds
'Sheet1'!J16 and so on.
Any help would be appreciated.
I would like to start to build a database of persons
details within my workbook template.
My idea is that each time Sheet1 is filled out, the persons
details (ie Surname, Given, DOB, Address, etc.) populates
to a database sheet that is hidden sheet in the workbook.
When the person is done filling out this sheet it gets
saved as an xls in another folder. This done with a macro.
I would like the database sheet, with this persons details
to stay in the template and each time the template is used
it stores the persons details, thereby building the
database within the template.
In the future I would like to be able to query the database
prior to filling out the sheet to see if the person is in
the database. If the person is there I would like to import
their details in the sheet.
Is this possible. If so can anyone point me in the right
direction.
Mark had given me the following example:
Private Sub cbAdd_Click()
Dim lRows As Long
With Range("Database")
lRows = .Rows.Count + 1
Range("A2:AH2").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"
End With
End Sub
The problem is that the Input cells get filled from another
sheet, they are referenced to another sheet (ie
='Sheet1'!J4). Everytime I run Mark's example, all it does
is does is copy 'Sheet1'!J4 and change it to 'Sheet1'!J15
and place it into the Database table. Run it again it adds
'Sheet1'!J16 and so on.
Any help would be appreciated.