Hi,
I need to transfer many different cells worth of data from man
different "Spares" workbooks into one "List" workbook.
I need this function to be automatic when the user clicks on
selection of buttons on "List". There will be different button
relating to the the different "Spares" workbooks that the data will b
taken from as not all of the "Spares" workbooks will be required all o
the time.
I also need the function not to overwrite any data already entere
either directly by the user or automatically into "List" from th
"Spares" workbooks.
I understand there is the ISBLANK function but I am usure how to use i
in this case.
Also the formatting of "List" is over three colums:
"Quantity", "Description" and "Part Number"
and does not start on cell A1.
A long question I know, but any ideas?
Thanks
Susi
Executor - 25 Jan 2006 11:35 GMT
Hi Susie,
I made something with these asumptions:
- for "List"
= Quantity in Column 'B'
= Description in Column 'C'
= Partnumber in Column 'D'
- for "Spares"
= Quantity on Sheet "Sales" in cell "G20"
= Description same sheet in cell "B1"
= Partnumber same sheet in cell "A1"
Sub InfoFromSpares(strName As String)
Dim strQuantity As String
Dim strDescription As String
Dim strPartNumber As String
ThisWorkbook.Sheets("List").Activate
ActiveSheet.Range("B2").End(xlDown).Offset(1, 0).Select
Application.Workbooks.Add (strName)
strQuantity = ActiveWorkbook.Sheets("Sales").Range("G20").Value
strDescription = ActiveWorkbook.Sheets("Sales").Range("B1").Value
strPartNumber = ActiveWorkbook.Sheets("Sales").Range("A1").Value
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
ThisWorkbook.Activate
ActiveCell.Value = strQuantity
ActiveCell.Offset(0, 1).Value = strDescription
ActiveCell.Offset(0, 2).Value = strPartNumber
End Sub
Hoop This Helps,
Executor