Solved

I get an error when I open my spreadsheet that has a query

Posted on 2015-01-14
3
133 Views
Last Modified: 2015-01-16
I have a spreadsheet with an ODBC query. When I open the spreadsheet, I get a "Run-time error '1004': Method 'Range' of object'_Global' failed" message. I attached a screenshot. When I click on Debug, it takes me to visual basics. How do I resolve this? Thanks!
Run-Time-Error-1004.png
0
Comment
Question by:brasiman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Assisted Solution

by:Michael Fowler
Michael Fowler earned 100 total points
ID: 40550067
Is the named range "Path" defined? If not it would explain the error. Quick check change Range("Path") to point to an empty cell as a test eg Range("A1").value
0
 
LVL 12

Accepted Solution

by:
James Elliott earned 400 total points
ID: 40551247
That cods is being triggered whenever the workbook is opened. It doesn't appear to have anything to do with your ODBC query. It looks like it's trying to capture whether the file location has changed since the file was last opened.
0
 

Author Closing Comment

by:brasiman
ID: 40553800
Thanks guys. Michael74 I tried your suggestion, and that pointed me in a direction. James, you are right, it was actually for a different query. I used this query for something else and modified it to be the new query. I just didn't delete all the old macros. Thanks for both your help!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question