CodePudding user response:
Is a batch to have content areas define nameCodePudding user response:
Sub findXLS ()
Dim curDir As String, xlsxName As String, fileType As String
FileType="\ *. XLSX"
CurDir=Application. ActiveWorkbook. Path
XlsxName=Dir (curDir & amp; FileType)
Application. DisplayAlerts=False
Application. ScreenUpdating=False
Dim RNG As Range
The Do While xlsxName & lt; & gt; "
"
Workbooks. Open fileName:=curDir + "" + xlsxName
The Set of RNG=ActiveWorkbook. ActiveSheet. UsedRange
If RNG. Count & lt; & gt; 0 Then
'the Debug. Print RNG (1, 1)
RNG (1, 1)=xlsxName
End the If
ActiveWorkbook. Close SaveChanges:=True
XlsxName=Dir
Loop
Application. ScreenUpdating=True
End Sub