wie kann ich aus der Mappe "WbQuelle" in der Tabelle "Tagesprotokoll" die Zeilennummmer vom 31.12 finden ?
mit dem unterem Code sagt er mir Nothing.
ze ist als Long deklariert und we als Variant
da = "01.01." & Year(Date)
da1 = "31.12." & Year(Date) - 1
Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
If da = Date Then
strfile = ThisWorkbook.Path & "\" & "Betriebstagebuch_" & Year(Date) - 1 & ".xlsm"
Set ex = CreateObject("Excel.Application")
Set wbZiel = ThisWorkbook
Set wbQuelle = ex.Workbooks.Open(strfile, , , , "bl")
With wbQuelle.Sheets("Tagesprotokoll")
.Activate
.Columns("E:E").Select
ze = Selection.Find(What:=da1, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=True, SearchFormat:=True).Activate
we = ze
End With
wbQuelle.Close savechanges:=False
wbZiel.Activate
With wbZiel.Sheets("Eingabe")
.Activate
.Unprotect "BIOCON"
.Cells(1, 1).Value = we
.Protect "BIOCON"
End With
End If