Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Fout 438 tijdens uitvoering:
Deze eigenschap of methode wordt niet ondersteund door dit object
'Workbooks(Bestandopen).Blad1.UsedRange.Copy Workbooks("nieuw " & naam & ".xlsx").Blad1.Cells(Blad1.UsedRange.Rows.Count, 1).End(xlUp).Offset(1)
Sub hsv()
Dim Bestandopen As String, naam As String
With Application
.DisplayAlerts = False
.ScreenUpdating = False
Workbooks.Add
naam = Format(Now, "dd-mm-yyyy hh_mm_ss")
ActiveWorkbook.SaveAs "h:\attachments\nieuw " & naam, 51 '?
Bestandopen = Dir("h:\attachments\*") ' ?
Do Until Bestandopen = ""
If Bestandopen <> ThisWorkbook.Name Then
Workbooks.Open "h:\attachments\" & Bestandopen ' ?
Workbooks(Bestandopen).Sheets(1).UsedRange.Copy Workbooks("nieuw " & naam & ".xlsx").Sheets(1).Cells(Sheets(1).UsedRange.Rows.Count, 1).End(xlUp).Offset(1)
Workbooks(Bestandopen).Close False
End If
Bestandopen = Dir
Loop
Workbooks("nieuw " & naam & ".xlsx").Sheets(1).Columns.AutoFit
Workbooks("nieuw " & naam & ".xlsx").Close True
.DisplayAlerts = True
End With
End Sub
Fout 9 tijdens uitvoering:
Het subscript valt buiten bereik
Workbooks("nieuw " & naam & ".xlsx").Sheets(1).Columns.AutoFit
If Bestandopen <> ThisWorkbook.Name then
If Bestandopen <> ThisWorkbook.Name And Bestandopen <> "nieuw " & naam & ".xlsx" Then
Sub hsv()
Dim Bestandopen As String, naam As String, i As Long, a As Long, x As Long, xx As Long
With Application
.DisplayAlerts = False
.ScreenUpdating = False
Workbooks.Add
naam = Format(Now, "dd-mm-yyyy hh_mm_ss")
ActiveWorkbook.SaveAs "h:\attachments\nieuw " & naam, 51
Bestandopen = Dir("h:\attachments\*")
Do Until Bestandopen = ""
If Bestandopen <> ThisWorkbook.Name And Bestandopen <> "nieuw " & naam & ".xlsx" Then
Workbooks.Open "h:\attachments\" & Bestandopen
With Workbooks("nieuw " & naam & ".xlsx")
For i = 1 To .Sheets(1).UsedRange.Columns.Count
a = .Sheets(1).Cells(Rows.Count, i).End(xlUp).Row
If a > x Then
x = a
xx = i
End If
Next i
Workbooks(Bestandopen).Sheets(1).Cells(1).CurrentRegion.Copy .Sheets(1).Cells(Rows.Count, xx).End(xlUp).Offset(1, -xx + 1)
Workbooks(Bestandopen).Close False
End With
End If
Bestandopen = Dir
Loop
Workbooks("nieuw " & naam & ".xlsx").Sheets(1).Columns.AutoFit
Workbooks("nieuw " & naam & ".xlsx").Close True
.DisplayAlerts = True
End With
End Sub
Workbooks(Bestandopen).Sheets(1).Cells(1).CurrentRegion.Copy
Workbooks(Bestandopen).Sheets(1).usedrange.Copy
Fout 438 tijdens uitvoering:
Deze eigenschap of methode wordt niet ondersteund door dit object
Next i
Workbooks(Bestandopen).Sheets(1).UsedRange.Copy
.Sheets(1).Cells(Rows.Count, xx).End(xlUp).Offset(1, -xx + 1).PasteSpecial -4163
Workbooks(Bestandopen).Close False
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.