hello,
i'm trying to make a list to order items.
i have a default file to order items here.
my current list is a small, for specific persons only, list
if they need an item they fill in Cells F8:F43
if they fill out one or more of the cells the VBA script has to copy a specific cell from the same row but in column S to another file.
i can typ them out 1 by 1 but this will take a lot of time.
is there anyway to make a small loop instead of typing it out cell by cell?
i'm trying to make a list to order items.
i have a default file to order items here.
my current list is a small, for specific persons only, list
if they need an item they fill in Cells F8:F43
if they fill out one or more of the cells the VBA script has to copy a specific cell from the same row but in column S to another file.
i can typ them out 1 by 1 but this will take a lot of time.
VBA Code:
Dim db, bl As Workbook
Set db = ActiveWorkbook
Workbooks.Open (ActiveWorkbook.Path & "\" & "xxxxxxxxxxxxxxx")
Set bl = ActiveWorkbook
db.Activate
ActiveWorkbook.Sheets("xxxxxxxxxxxxx").Activate
Range("F8").Select
If ActiveCell.Value = "" Then
Else
Range("S8").Select
Selection.Copy
bl.Activate
Range("C12").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End If
db.Activate
ActiveWorkbook.Sheets("xxxxxxxxxxxxxxxxx").Activate
Range("F9").Select
If ActiveCell.Value = "" Then
Else
Range("S9").Select
Selection.Copy
bl.Activate
Range("C12").Select
If ActiveCell.Value = "" Then
Range("C12").PasteSpecial Paste:=xlPasteValues
Else
Range("C13").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
end If
End If
End Sub
is there anyway to make a small loop instead of typing it out cell by cell?