Selection.AutoFill
27.06.2015 13:08:07
Alexander
Hallo,
kann mir mal wer bitte helfen, ich hab offensichtlich einen Syntaxfehler im Bereich der Autofillfunktion am Ende, kann mir bitte einer sagen, was da nicht stimmt? Danke!
Sub DateiOeffnen()
Dim Filename As String
Dim Pfad As String
ChDrive ("C:\")
ChDir ("C:\DVD\")
Filename = Application.GetOpenFilename
If Filename <> "Falsch" Then
Filename = Dir(Filename)
Pfad = CurDir
Range("C2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],'" & Pfad & "\[" & Filename & "]Prg'!c12:c17,6, _
_
_
FALSE)"
Application.CutCopyMode = False
lz = Cells(Rows.Count, 1).End(xlUp).Rows.Row
Selection.AutoFill Destination:=Range(.Cells(2, 3), .Cells(lz, 3)), Type:=xlFillDefault
End If
End Sub