blikbanaan
Gebruiker
- Lid geworden
- 16 feb 2012
- Berichten
- 67
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.
Sub PDF_ophalen1()
Dim sa As String
On Error GoTo Fout
For i = 14 To 86
sa = "D:\PDF_call\" & Sheets("recept").Cells(i, 4) & ".pdf"
If Dir(sa, 12) <> "" Then
ThisWorkbook.FollowHyperlink sa
End If
Next i
Exit Sub
Fout:
MsgBox """" & Sheets("recept").Cells(i, 4) & ".pdf"" bestaat niet"
End Sub
Hij leest de regels 14 t/m 86 in kolom D. Cells(i, 4)werkt voor een gedeelte haalt in kolom D steeds de zelfde pdf op welke in D14 (met dubbelklik) staat ingevuld in de cel, en zou de waarde welke in bv D15 of D80 moeten ophalen.
Sub PDF_ophalen()
Dim sa As String
On Error GoTo Fout
r = ActiveCell.Row
If r > 13 And r < 87 Then
sa = "D:\PDF_call\" & Sheets("recept").Cells(r, 4) & ".pdf"
If Dir(sa, 12) <> "" Then
ThisWorkbook.FollowHyperlink sa
End If
End If
Exit Sub
Fout:
MsgBox """" & Sheets("recept").Cells(r, 4) & ".pdf"" bestaat niet"
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
c00 = "E:\Temp\"
If Intersect(Target, Range("D14:D86")) Is Nothing Then Exit Sub
Cancel = -1
On Error GoTo Fout 'of een andere foutcontrole
ThisWorkbook.FollowHyperlink c00 & Target.Value & ".pdf"
Exit Sub
Fout:
MsgBox "bestand niet gevonden"
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.