Excel macro question
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Me.Cells(Target.Row, "A").Value < "" Then
Me.Cells(Target.Row, "A").Resize(, 15).Copy _
Worksheets("Sheet2").Range("A1")
Worksheets("Sheet3").PrintOut
End If
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Kirby" wrote in message
...
I've inherited a excel 2003 workbook thats an inventory listing of
devices.
It has 3 worksheets, the 1st sheet lists devices on each row with column
headings like device name; serial #; location, etc. The 2cd is a link to
the
3rd which is a form that gets printed out. So you copy your device info
from
sheet 1 to sheet 2 and it fills in the form. My ? is there a way to select
say row 2 then run a macro that says if a row is selected copy A2 to O2 to
sheet 2 A1 to O1? And is it also possible to then have a macro that prints
out the form on sheet 3? This would eliminate a lot of manual steps.
--
Thank you in advance
Kirby
|