Sub test()
Dim strDatei As Variant
Dim strQuelle1 As String
Dim strQuelle2 As String
Dim strZiel As String
Dim i, MAX As Integer
MAX = ActiveSheet.Cells(Rows.Count, 6).End(xlUp).Row
For i = 2 To MAX
Range("F" & i).Select
Selection.Replace What:="MON", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Selection.Replace What:=" /*.jpg", Replacement:=".jpg", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
strDatei = ActiveCell
strQuelle1 = "U:\Grosser\Bilder\Monacor\" & strDatei
strQuelle2 = "U:\Grosser\Bilder\_NoImage.jpg"
strZiel = "U:\Projekte\Websites\_Grosser\Cart\" & strDatei
If Dir("U:\Grosser\Bilder\Monacor\" & strDatei) = "" Then
ActiveCell = "_NoImage.jpg"
Else
FileCopy strQuelle1, strZiel
End If
Next
Stop
FileCopy strQuelle2, strZiel
End Sub strQuelle1 = "U:\Grosser\Bilder\Monacor\" & strDatei
strQuelle2 = "U:\Grosser\Bilder\_NoImage.jpg"
strZiel = "U:\Projekte\Websites\_Grosser\Cart\" & strDatei
If Dir("U:\Grosser\Bilder\Monacor\" & strDatei) = "" Then
ActiveCell = "_NoImage.jpg"
FileCopy strQuelle2, strZiel
Else
FileCopy strQuelle1, strZiel
End If
Next
End Sub
VBA-Problem mit CHR(13)
Kauz 09.11.2009 - 411 Hits - 10 Antworten
Problem mit einen VBA Code
speedy71 23.01.2010 - 203 Hits - 4 Antworten
Problem mit zwei VBA Befehle
juppjuppes 20.05.2010 - 255 Hits - 9 Antworten
Problem Schreibschutz in verbindung mit VBA
juppjuppes 21.05.2010 - 104 Hits - 2 Antworten
VBA GetOpenFileName Problem
123harald123 23.06.2010 - 76 Hits - 2 Antworten