OVH Cloud OVH Cloud

calcul excel dans access 2000

1 réponse
Avatar
lou
bonjour

je suis dans un form access 2000
j'ai un champ "MontantFact "

je voudrais si c'est possible faire une addition dans "MontantFact " a
partir d'une colonne qui se trouve dans un fichier excel


ex: MontantFact = total AB5 jusque AB108

j'ai fait ceci mais ça marche pas

Dim appXl As Excel.Application
Set appXl = CreateObject("Excel.Application")

With appXl
.Workbooks.Open ("C:\Backsoc\107104678_20050203.xls")
.Visible = True

MontantFact = .Range("AB5:AB104")

End With

Set appXl = Nothing

exusez un débutant
merci de votre aide

1 réponse

Avatar
Raymond [mvp]
Bonjour.

il vaudrait mieux créer une cellule somme dans excel et récupérer cette
cellule dans access.

--
@+
Raymond Access MVP
http://OfficeSystem.Access.free.fr/
http://OfficeSystem.Access.free.fr/runtime/
http://users.skynet.be/mpfa/ pour débuter sur le forum


"lou" a écrit dans le message de news:
42147887$0$23954$
bonjour

je suis dans un form access 2000
j'ai un champ "MontantFact "

je voudrais si c'est possible faire une addition dans "MontantFact " a
partir d'une colonne qui se trouve dans un fichier excel


ex: MontantFact = total AB5 jusque AB108

j'ai fait ceci mais ça marche pas

Dim appXl As Excel.Application
Set appXl = CreateObject("Excel.Application")

With appXl
.Workbooks.Open ("C:Backsoc107104678_20050203.xls")
.Visible = True

MontantFact = .Range("AB5:AB104")

End With

Set appXl = Nothing

exusez un débutant
merci de votre aide