-1
你能帮我请创建一个从磁盘搜索文件的宏, 请看:C:\Etikety\Stitky\
。 我搜索一个名称,其中包含的单元格C2
和文件类型是.lbe
当文件发现打印它。 我会将这部分代码实现到此代码中。谢谢答复excel宏VBA搜索和打印文件
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub zadat()
Dim reg, check As String
Dim i, j, done As Integer
reg = Cells(2, 3).Value
check = Cells(4, 3).Value
If check = "True" Then
i = 2
j = 1
done = 0
Do While Sheets("data").Cells(i, j) <> ""
If Sheets("data").Cells(i, j) = reg Then
done = Sheets("data").Cells(i, j + 3)
done = done + 1
Sheets("data").Cells(i, j + 3) = done
Exit Do
End If
i = i + 1
Loop
Else
MsgBox ("Chyba, oprav!!!")
End If
Cells(3, 3) = ""
Cells(3, 3).Select
ActiveWindow.ScrollRow = Cells(1, 1).row
End Sub
http://stackoverflow.com/questions/20687810/vba-macro-that-search-for -file-in-multiple-subfolders – Slai