Compléments pour Microsoft Access

http://access.fr.free.fr/

Ouvrir fichier Excel (Automation)

Description 

Cette fonction permet d'ouvrir un fichier Excel.

Remarque : Pour fonctionner, il faudra rajouter la référence "Microsoft Excel x.xx Object Library".

 
Synthaxe 

OpenFileExcel (strDirFile)

La synthaxe de la fonction OpenFileExcel comprend l'élément suivant :

ElémentsDescription

strDirFile

Expression de chaîne correspondant au chemin complet et au nom du fichier que l'on souhaite ouvrir dans Excel.
 
Exemple 

Aucun exemple disponible pour le moment.

 
Code de la fonction 


Function OpenFileExcel(strDirFile As String)

Dim appXl As Excel.Application

Set appXl = CreateObject("Excel.Application")

With appXl
    .Workbooks.Open strDirFile
    .Visible = True
End With

Set appXl = Nothing

End Function