no save
Assistance
Achat
News

Forum | programmation
cellule excel vers cellule access
mohammed, le dim. 23 janv. 2005 à 15:58:09
Salut,
comme je n'ai pas le temps je vous ais trouver ce ptit module Private Sub Commande1_Click()
On Error GoTo Err_Commande1_Click

Dim MaBase As DAO.Database
Dim Matable As DAO.recordset


'Défini le nom de votre fichier Excel
MonFichier = "nomdevotrefichier.xls"

'Ouvre l'application Excel
Set MonXL = CreateObject("Excel.Application") 'Ceci initialise la
Set MaBase = CurrentDb()
Set Matable = MaBase.openrecordset("TableName")

'Ouvre MonFichier
MonXL.Workbooks.Open FileName:="C:\Mes Documents\" & mon fichier"

matable![nomchamp]=MonXL.Range("A1").Value
Exit_Commande1_Click:
Exit Sub

Err_Commande1_Click:
MsgBox Err.description
Resume Exit_Commande1_Click

End Sub

à la place de A1 la cellules à exporter.
Bonne chance.
Merci
Précédentmohammed
janv. 05
mohammed
janv. 05
Suivant
REPONSES
mohammed
janv. 05
mohammed
janv. 05
mohammed
janv. 05
Thibal_jam
janv. 05
mohammed
janv. 05
Thibal_jam
janv. 05
mohammed
janv. 05
toubiloup
févr. 05
Thibal_jam
févr. 05
toubiloup
févr. 05
Version Web
Réalisé par RedShift
no save