Goedemiddag,
Bij het uitvoeren van onderstaande macro krijg ik telkens een error:
"Fout 91 tijdens uitvoering
Objectvariabele of blokvariabele With is niet ingesteld"
Heb zelf geen idee hoe dit komt ... Alle hulp is welkom dus.
Dank alvast.
Sub Invoerenindatabase()
' Controle lege cellen
For Each cell In Range("G3:G7")
cell.Interior.ColorIndex = xlNone
If IsEmpty(cell) Then
i = 1
cell.Interior.ColorIndex = 6
End If
Next
If i > 0 Then MsgBox "Vul de gele cellen in": Exit Sub
' PDF maken
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="I:\LOGISTIEK\KEURINGEN\CERTIFICATEN NIEUWE MODULE\ZUIG PERS CHEMIESLANGEN" & Range("G7").Value & "_" & Format(Date, "yyyymmdd") & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
' Afdrukken
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 10) = .Cells(3, 7)
End With
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 12) = .Cells(28, 5)
End With
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 3) = .Cells(10, 5)
End With
End Sub
Bij het uitvoeren van onderstaande macro krijg ik telkens een error:
"Fout 91 tijdens uitvoering
Objectvariabele of blokvariabele With is niet ingesteld"
Heb zelf geen idee hoe dit komt ... Alle hulp is welkom dus.
Dank alvast.
Sub Invoerenindatabase()
' Controle lege cellen
For Each cell In Range("G3:G7")
cell.Interior.ColorIndex = xlNone
If IsEmpty(cell) Then
i = 1
cell.Interior.ColorIndex = 6
End If
Next
If i > 0 Then MsgBox "Vul de gele cellen in": Exit Sub
' PDF maken
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="I:\LOGISTIEK\KEURINGEN\CERTIFICATEN NIEUWE MODULE\ZUIG PERS CHEMIESLANGEN" & Range("G7").Value & "_" & Format(Date, "yyyymmdd") & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
' Afdrukken
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 10) = .Cells(3, 7)
End With
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 12) = .Cells(28, 5)
End With
' Cellen invoeren in database
With Sheets("CERTIFICAAT")
Sheets("DATABASE ZUIG-PERS-CHEMIESLANG").Range("B:B").Find(.Cells(7, 7)).Offset(, 3) = .Cells(10, 5)
End With
End Sub