Home > Software engineering >  Under the new beginner, can you tell me the vba read the file problem (enclosed some specific code)
Under the new beginner, can you tell me the vba read the file problem (enclosed some specific code)

Time:04-18

May I ask you bosses under
The code can be simplified into
Sub test ()
The Set RRR=CreateObject (" Scripting. FileSystemObject ")
The Set r=RRR. GetFolder (" D: \ practice ")
For Each I In r.F iles
Workbooks. Open Filename:=(" D: \ \ practice "+ i.N ame +" ")
ActiveSheet. Range (" A1 ")=1
ActiveWorkbook. Close SaveChanges:=True
Next
End Sub

Code is designed to make D/practice this folder each workbook A1 area of assignment 1

The Workbooks, please. Open Filename:=(" D: \ \ practice "+ i.N ame +" ") in this line of code, two plus refers to what do you mean? Why must have these two +? Tried without the plus sign will be an error, is this why?
  •  Tags:  
  • VBA
  • Related