
Sub pdf()
Sheets("Menu").Select
Percorso = Range("B8").Value
Sheets("Base").Select
Range("H:H").Select
Nome = Range("H1").Value
NomeNew = Percorso & Range("C1")
NomeOld = Percorso & Nome
While ActiveCell.Offset(0, 0).Value > " "
If Len(Dir(Percorso & Nome)) = 0 Then
MsgBox "Questo file non esiste: " & Nome & este
Else
Name NomeOld As NomeNew
End If
ActiveCell.Offset(1, 0).Select
Nome = ActiveCell.Offset(0, 0).Value
NomeNew = Percorso & ActiveCell.Offset(0, 2).Value
NomeOld = Percorso & Nome
Wend
End Sub |
Sub pdf()
Sheets("Menu").Select
Percorso = Range("B8").Value
Sheets("Base").Select
Range("H1").Select
Nome = Range("H1").Value
NomeNew = Percorso & Range("C1")
NomeOld = Percorso & Nome
While ActiveCell.Offset(0, 0).Value > " "
If Len(Dir(Percorso & Nome)) = 0 Then
MsgBox "Questo file non esiste: " & Nome & este
Else
Name NomeOld As NomeNew
End If
ActiveCell.Offset(1, 0).Select
Nome = ActiveCell.Offset(0, 0).Value
NomeNew = Percorso & ActiveCell.Offset(0, -5).Value
NomeOld = Percorso & Nome
Wend
End Sub |
