UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Open Excel With Vba Script, Access 2016    
 
   
geoffk7828
post Sep 10 2019, 02:51 AM
Post#1



Posts: 23
Joined: 21-October 06
From: Barossa Valley South Australia, Australia


Hi All

I have the following script that has stopped working and gives this message:

Attached File  Excel.png ( 46.51K )Number of downloads: 6


This works without a problem in DB-1 which I have been working with for a long time an as such has many redundant Tables, Forms etc.

I created a blank DB (DB-2) and copied all relevant Tables, Form, Queries etc, I now get the results shown above, both DB's are the same Version and Build (Version1908 Build 11929.20254).

DB-1 has evolved from 2003, I think This may have something to do with the problem.

Can anyone advise.

Geoff
Go to the top of the page
 
June7
post Sep 10 2019, 03:47 AM
Post#2



Posts: 796
Joined: 25-January 16



Should copy/paste code into post between CODE tags, not attach an image. Image is too hard to read without opening to another window.

Need to select Excel reference in VBA Editor > Tools > References > check Microsoft Excel x.x Object Library

This post has been edited by June7: Sep 10 2019, 04:46 AM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
Phil_cattivocara...
post Sep 10 2019, 03:47 AM
Post#3



Posts: 342
Joined: 2-April 18



You are writing code using earlybinding and you need Microsoft Excel Object Library reference.
See this recent thread to do that Fix Missing Reference

If you change your code using latebinding you will never have that problem.

--------------------
Please forgive in advance my horrible English.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    17th September 2019 - 06:19 PM