Beste Hulpverleners,
Het lukt mij maar niet om met deze code een hyperlink te schrijven naar sheet factuuroverzicht
wat doe ik hier fout ?
graag jullie hulp hoe het wel moet
vr.grt,
Willem
Het lukt mij maar niet om met deze code een hyperlink te schrijven naar sheet factuuroverzicht
wat doe ik hier fout ?
Code:
FacName = ActiveSheet.Range("D11").value
btw21 = [F33].value
btw6 = [F34].value
btw0 = [F32].value
Verzendwijze = [A34].value
Vervaldatum = [B39].value
Naam = [C3].value
Btwbedrag = [C30].value
Debiteurnummer = [D9].value
Factuurnummer = [D11].value
Factuurbedrag = [E30].value
Status = [F13].value
With Sheets("Factuuroverzicht")
lastrij = .[A10002].End(xlUp).Row
.Cells(lastrij + 1, "A").value = Factuurnummer
.Cells(lastrij + 1, "B").value = Status
.Cells(lastrij + 1, "C").value = Debiteurnummer
.Cells(lastrij + 1, "D").value = CDate(LstrDate)
.Cells(lastrij + 1, "E").value = Format(Factuurbedrag, "€ #,##0.00")
.Cells(lastrij + 1, "F").value = Format(Btwbedrag, "€ #,##0.00")
.Cells(lastrij + 1, "H").value = Vervaldatum
.Cells(lastrij + 1, "I").value = Naam
[COLOR="#FF0000"].Cells(lastrij + 1, "J").value = ActiveSheet.Hyperlinks.Add Address:="C:\Users\" & Environ("username") & "\Documents\Excel facturatie\facturen\Factuurnr. " & FacName & ".pdf",TextToDisplay:="Factuurnr. " & FacName & ".pdf"
[/COLOR].Cells(lastrij + 1, "L").value = Verzendwijze & Format(Date, "dd-mm-yyyy") & Format(TimeValue(Now), " hh:mm")
.Cells(lastrij + 1, "W").value = Format(btw0, "€ #,##0.00")
.Cells(lastrij + 1, "X").value = Format(btw6, "€ #,##0.00")
.Cells(lastrij + 1, "Y").value = Format(btw21, "€ #,##0.00")
End With
graag jullie hulp hoe het wel moet
vr.grt,
Willem