YellowLabPro
08-25-2007, 09:37 AM
Code posted for example: The loop is not really feasible, but is my first attempt to get my idea out and show how I might copy the data from the source to the target. The code is presented this way as a start to forming the logic.
Sub EditRecords()
Dim Wss As Worksheet, Wst As Worksheet
Dim i As Long, lLrws As Long
Set Wss = Workbooks("MasterImportSheetWebStore.xls").Sheets("TGFF")
Set Wst = Workbooks("MaintImport.xls").Sheets("Record Creator")
lLrws = Wss.Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lLrws
Wst.Cells(i, "Y").Value = Wss(i, "D").Value
Next i
End Sub
I want to copy particular columns from sheet 1 to sheet 2.
Sheet 1 is filtered to show only the desired records.
There will always be a header, so row 1 is not to be included.
The destination row will always begin in row 6.
I was thinking of using something like the Visible Property, where it will perform the instructions on what is visible. Is this a permittable approach. It is a property so I am not clear if this is possible.
Sub EditRecords()
Dim Wss As Worksheet, Wst As Worksheet
Dim i As Long, lLrws As Long
Set Wss = Workbooks("MasterImportSheetWebStore.xls").Sheets("TGFF")
Set Wst = Workbooks("MaintImport.xls").Sheets("Record Creator")
lLrws = Wss.Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lLrws
Wst.Cells(i, "Y").Value = Wss(i, "D").Value
Next i
End Sub
I want to copy particular columns from sheet 1 to sheet 2.
Sheet 1 is filtered to show only the desired records.
There will always be a header, so row 1 is not to be included.
The destination row will always begin in row 6.
I was thinking of using something like the Visible Property, where it will perform the instructions on what is visible. Is this a permittable approach. It is a property so I am not clear if this is possible.