G
Gerard Goodland
Hi all,
Below is the macro that I have put together from , recording, some from
help I got here and some of it I done. The sheet "Contacts" has aprox
300 rows of contact info that I need to copy and paste into the sheet
called "Inventory" in the same workbook.I then save the "Inventory"
sheet to a new workbook and save it with the name of the file comming
from cell 'X4".I then save and close this new workbook.Now I need to go
back to the original workbook " Contacts" sheet and move down to the
next row and do it all over again until there are no more entries left
in the " Contacts" sheet. I hope that is not too confusing. I have got a
lot of help here in the last few days and I really appreciate it.
Thanks
Dim myRow As Long
Sheets("Contacts").Select
For myRow = 1 To .Range("A65536").End(xlUp).Row
Range("B7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D4").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("C7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D5").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("D7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D6").Select
ActiveSheet.Paste
Range("D7").Select
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("E7").Select
Selection.Copy
Sheets("Inventory").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("Contacts").Select
Range("A7").Select
Selection.Copy
Sheets("Inventory").Select
Range("X4").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Range("F7:G7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Inventory").Select
Range("W6").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=3
Sheets("Inventory").Select
Range("X4").Select
Sheets("Inventory").Select
Sheets("Inventory").Copy
ActiveWorkbook.SaveAs _
Filename:=ActiveWorkbook.Worksheets(1).Range("x4").Value
ActiveWorkbook.Close SaveChanges:=True
Next myRow
End Sub
Below is the macro that I have put together from , recording, some from
help I got here and some of it I done. The sheet "Contacts" has aprox
300 rows of contact info that I need to copy and paste into the sheet
called "Inventory" in the same workbook.I then save the "Inventory"
sheet to a new workbook and save it with the name of the file comming
from cell 'X4".I then save and close this new workbook.Now I need to go
back to the original workbook " Contacts" sheet and move down to the
next row and do it all over again until there are no more entries left
in the " Contacts" sheet. I hope that is not too confusing. I have got a
lot of help here in the last few days and I really appreciate it.
Thanks
Dim myRow As Long
Sheets("Contacts").Select
For myRow = 1 To .Range("A65536").End(xlUp).Row
Range("B7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D4").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("C7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D5").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("D7").Select
Selection.Copy
Sheets("Inventory").Select
Range("D6").Select
ActiveSheet.Paste
Range("D7").Select
Sheets("Contacts").Select
Application.CutCopyMode = False
Range("E7").Select
Selection.Copy
Sheets("Inventory").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("Contacts").Select
Range("A7").Select
Selection.Copy
Sheets("Inventory").Select
Range("X4").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Range("F7:G7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Inventory").Select
Range("W6").Select
ActiveSheet.Paste
Sheets("Contacts").Select
Application.CutCopyMode = False
ActiveWindow.SmallScroll ToRight:=3
Sheets("Inventory").Select
Range("X4").Select
Sheets("Inventory").Select
Sheets("Inventory").Copy
ActiveWorkbook.SaveAs _
Filename:=ActiveWorkbook.Worksheets(1).Range("x4").Value
ActiveWorkbook.Close SaveChanges:=True
Next myRow
End Sub