0 votes
in VBA by Beginner (2 points)
Hi,

How can I get data from closed files with ADO? Is there any sample?

Thank You

1 Answer

0 votes
by Beginner (65 points)
Sub GetValueFromFile()
    Dim Ex As Excel.Workbook
    'File Path
    Set Ex = GetObject("C:\Users\à\Desktop\CCF13082019.xlsx")
    MyValue = Ex.Sheets("Sheet1").Range("A1")
    Set Ex = Nothing
End Sub

 

by Beginner (2 points)

Hi,

Thank you for your help. But this error massage is coming. Is it possible to solve it?

Error massage

Thank You

by Beginner (2 points)
Hi,

https://drive.google.com/open?id=1FQ0yZeUg0cKVB1PLueEqUh8xJ_ywDCOS

Thank you for your help. Now I am getting Error 1004.

Thank you for all
by Beginner (65 points)
I have a web filter that blocks me from this file, you can only upload your code here

Welcome to wellsr Q&A
Ask any questions you have about VBA and Python and our community will help answer them. wellsr Q&A is the standalone question and answer platform for wellsr.com. If you have a question about one of our specific tutorials, please include a link back to the tutorial.

Getting Started
Register
VBA Cheat Sheets (On Sale Now)

Looking for something else? Hire our team directly through ourVBA Help page, instead.

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...