Arborescence d'un disque sur mac et PC

Sur Mac, je voudrais sélectionner un répertoire en appellant la boite de dialogue appropriée.

Cette macro fonctionne sur mac (xl98) et PC (xl97)

sub LectureChoix()
 Dim Sep As String, OS As String, i As Integer, Car As String, Chemin As String
  DocChoisi = Application.GetOpenFilename
  
    If DocChoisi = "False" Or DocChoisi = "Faux" Then
      End
    End If
  OS = Application.OperatingSystem
    Select Case Left(OS, 1)
      Case "M"
        Sep = ":"
      Case "W"
        Sep = ""
    End Select
  i = 0
    Do While Car <> Sep
      i = i + 1
      Car = Left(Right(DocChoisi, i), 1)
    Loop
  Chemin = Left(DocChoisi, Len(DocChoisi) - i)
 end sub

Auteur :

Mots clefs associés à cette page : ,