Всем документам в папке установить одинаковые параметры страницы — Basic(Бейсик)

Dim MyPath As String
Dim MyName As String
Dim xls As Object
MyPath = "c:\*.xls"
MyName = Dir(MyPath)
 
Do While MyName <> ""
Set xls = CreateObject("Excel.Application")
xls.Visible = False
xls.Workbooks.open MyName
' Working with sheets
xls.Quit 'With Save Parameters
Set xls = Nothing
MyName = Dir
Loop

Leave a Comment