View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
J. Toews[_2_] J. Toews[_2_] is offline
external usenet poster
 
Posts: 1
Default Automation between Access and Excel

Thanks for the help Ivan..

Regards

JT

"Ivan F Moala" wrote:


Try changing this bit;

Do Until UCase(Trim(Range("A" & liRow).Value)) = "END"
If Range("A" & liRow).Value = "IDCODE" Then


To


Do Until UCase(Trim(.Range("A" & liRow).Value)) = "END"
If .Range("A" & liRow).Value = "IDCODE" Then

The diff is in how you have referenced the Xl object using the With Key
word.
In COM automation not qualifying your addresses can lead to ghost refs
to another instance of the obj.

Also try dim all references to a Row as Long and NOT integer..... just
incase.


--
Ivan F Moala


------------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954
View this thread: http://www.excelforum.com/showthread...hreadid=267702