Sub Test()
Dim f As String, folder As String, wb As Workbook
folder = "D:\1\"
f = Dir(folder & "Test*.xls*")
While f > ""
Set wb = Workbooks.Open(folder & f)
wb.Sheets(1).[a4] = ""
wb.Close True
f = Dir
Wend
MsgBox "OK"
End Sub
Dim f As String, folder As String, wb As Workbook
folder = "D:\1\"
f = Dir(folder & "Test*.xls*")
While f > ""
Set wb = Workbooks.Open(folder & f)
wb.Sheets(1).[a4] = ""
wb.Close True
f = Dir
Wend
MsgBox "OK"
End Sub
解决方案 »
- 关于image和picturebox控件的问题!!
- 关于多行文本框的一个问题
- cpu占用量问题
- 奇怪的问题!请大家帮忙
- 救命啊!!这个控件过期了:实在是郁闷。(九州软件的coolbutton)
- 通过猫拨号到服务器上。通过ado能访问服务器上的数据库吗???数据上传可行吗??
- VB打包时的出现的问题,如何解决?(高分求助)
- VB操作Excel文件时出现错误componet busy:this action cannot be completed because the other application is busy
- 怎么在Text控件中换行?
- 为什么将数据从数组写入Row,会消耗巨大的内存?
- 寻找VB编写OCX在DELPHI下使用的转换软件VBOCX2Delphi.exe
- 如何根据当前EXCEL版本,调用相应的EXCEL程序 将程序中的数据导出到EXCEL文件
Dim strFile As String, wb As Workbook
strFile = Dir("D:\1\" & "Test*.xls")
Do Until strFile = ""
Set wb = Workbooks.Open(D:\1\" & strFile)
wb.Sheets(1).[a4] = ""
wb.Close True
strFile = Dir()
Loop
MsgBox "OK"
End Sub