Order form linked to inventory

L

Lella

I've been asked to set-up an inventory sheet of graphics, banners etc. and a
Request form for our client to fill out. I am trying to combine the two so
that the client can click on the ID# in one sheet and that number fills
itself into the Request form on another sheet.
 
J

JW

On the sheet where you where the client will be clicking, place this
in the sheet module.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
If Not IsEmpty(Target) Then _
Sheets("Sheet2").Cells(1, 1).Value = _
Target.Text
End If
End Sub

You will most likely have to make some changes to this. This is
assuming that the ID is in column 1 and that you want the values
placed in A1 of Sheet2. Simply make the necessary adjustments.
 
L

Lella

Thank you so much...but one other question. I have a column of different ID#
whenever I press more than one it removes the previous selection on the
request form. What do I do to make the selections continue down the request
form?
 
J

JW

You want it to continue down the same column whenever a new selection
is made? Is that right? If so:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
If Not IsEmpty(Target) Then _
Sheets("Sheet2").Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Value = Target.Text
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top