takze odpoved je takato:
Private xl As Excel.Application
Private W As Workbook
Private W2 As Workbook
Private XlsName() As String
sub test()
Set xl = CreateObject("Excel.Application")
Set W2 = xl.Workbooks.Open(Application.ThisWorkbook.Path & "\Complet.XLSX")
For x = LBound(XlsxName) To UBound(XlsxName)
Set W = xl.Workbooks.Open(Application.ThisWorkbook.Path & "\TEST\" & aName)
'TU SA DOPISE PRESNE CO MA ROBIT s W2 a W
W.Close False
Next
Set xl = Nothing
end sub
Private Sub LoadNameXLSM()
MyFile = FileSystem.Dir(Application.ThisWorkbook.Path & "\TEST\" & "*.xlsm")
Do While MyFile <> ""
ReDim Preserve XlsxName(x)
XlsName(x) = MyFile
x = x + 1
MyFile = FileSystem.Dir
Loop
End Sub
otazky teraz zniu:
- bude sa tabulka vzdy nachadzat prvom sheete?
- stlpce v tabukach budu mat iste poradie alebo sa menia?
- ake dalsie zazraky chcete aby torobilo?citovat