i**M 发帖数: 108 | 2 ThisWorkbook.Activate
Sheets("aa").Activate
mycount = Application.CountA(Range("A5:A100"))
For i = 2 To mycount
transdate = Cells(i, 1).Text
NameFile1 = "C:\Documents and Settings\Desktop" & bb& ".xlsx"
Set wb =Workbooks.Open(Filename:=NameFile1)
Next i
I want to read files' name from a spreadsheet and open those files. The
above is the vba code I wrote, but i got "application defined or object
defined error". I am a beginner of vba, anyone ple... 阅读全帖 |
|