Sub
Makro1()
Dim
Wb2
As
Workbook, Ws2
As
Worksheet
Dim
lngWert
As
Long
, lngTabelle
As
Long
, lngSpalte
As
Long
lngWert = 1
lngTabelle = 1
lngSpalte = 1
Application.ScreenUpdating =
False
Set
Wb2 = Workbooks.Open(Filename:=
"C:\Temp\Test.xlsx"
)
Set
Ws2 = Wb2.Sheets(lngTabelle)
lngWert = Application.WorksheetFunction.CountIf(Ws2.Columns(lngSpalte), lngWert)
Wb2.Close
Application.ScreenUpdating =
True
MsgBox
"gefunden "
&
CStr
(lngWert)
End
Sub