DDERequest - requesting from Access to Excel

F

FTL

Hi
I am trying to make a code that gets values from a sheet i Excel into a form
in Access, and I want to read the values from the cell D22 and downwords in
the D-collunm.
I am using DDERequest, with the 2 arguments "channum" and "item"....
And it works fine when I use"R22C4" as the item, but not when I use a string
to make it.

Any suggestions?


Here is some of the code:

Dim vKanalnr As Long
vKanalnr = DDEInitiate("Excel", "f:\OrdreDB\tmpLagring\tmpOrdre.xls")

Dim vTeller As Byte
Dim vRef, vVerdi As String
For vTeller = 22 To 222
vRef = """R" & vTeller & "C4"""
vVerdi = DDERequest(vKanalnr, vRef) ---> doesn't work, while
this do: vVerdi = DDERequest(vKanalnr, "R22C4")
.....

Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top