little-key
Cadet 2nd Year
- Registriert
- Jan. 2009
- Beiträge
- 28
Wie bekomme ich den Code nun in eine Schleife, so dass Zelle für Zelle in Spalte F abgeklappert wird:
Sub test2()
Range("F1").Select
Dim strDatei As Variant
Dim strQuelle As String
Dim strZiel As String
strDatei = ActiveCell
strQuelle = "U:\Grosser\Bilder\Monacor\" & strDatei
strZiel = "U:\Projekte\Websites\_Grosser\Cart\" & strDatei
If Dir("U:\Grosser\Bilder\Monacor\" & strDatei) = "" Then
ActiveCell = "_NoImage.jpg"
Else
FileCopy strQuelle, strZiel
End If
End Sub
Danke Mario
Sub test2()
Range("F1").Select
Dim strDatei As Variant
Dim strQuelle As String
Dim strZiel As String
strDatei = ActiveCell
strQuelle = "U:\Grosser\Bilder\Monacor\" & strDatei
strZiel = "U:\Projekte\Websites\_Grosser\Cart\" & strDatei
If Dir("U:\Grosser\Bilder\Monacor\" & strDatei) = "" Then
ActiveCell = "_NoImage.jpg"
Else
FileCopy strQuelle, strZiel
End If
End Sub
Danke Mario