No, but we can accommodate that as well.
Sub CopiaESalvaInPathX()
Dim username As String
'-----------------------------------------------------------------------------------------
username = Foglio5.Range("A2")
Select Case Application.Version
Case "8.0" 'Excel 97
Case "9.0" 'Excel 2000
Case "10.0" 'Excel 2002
Case "11.0" 'Excel 2003
sPath = "C:\Documents and Settings\" & username & "\Documenti\rapportini_ore_straordinarie" 'excel 2003
Case "12.0" 'Excel 2007
sPath = "C:\Users\" & username & "\Documents\rapportini_ore_straordinarie" 'excel 2007
Case "14.0" 'Excel 2010
Case "15.0" 'Excel 2013
Case "16.0" 'Excel 2016
End Select
End Sub
or you could just do a later or earlier than coercion
Sub CopiaESalvaInPathX()
Dim username As String
'-----------------------------------------------------------------------------------------
username = Foglio5.Range("A2")
Select Case Application.Version
Case "9.0", "10.0", "11.0" 'Excel 2003
sPath = "C:\Documents and Settings\" & username & "\Documenti\rapportini_ore_straordinarie" 'excel 2003
Case "12.0", "14.0", "15.0", "16.0" 'Excel 2007
sPath = "C:\Users\" & username & "\Documents\rapportini_ore_straordinarie" 'excel 2007
End Select
End Sub
Bookmarks