Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

macro compatibility

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
efader - 08 Apr 2008 21:19 GMT
Hi:

I have a macro in excel 2003 that aggregates content from other excel
files and puts data into one spreadsheet.

It works in excel 2003, however does not work in excel 2007.  In excel
2007 I receive the following message:

"the file name, sheet name or Range is invalid of "

Here is a sample of the code that I am using:

GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1", _
           "c12:p21", Sheets("UV PV  TM AMPV Data").Range("b2"),
False, False
   GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1", _
           "d10:p10", Sheets("Summary Raw Data").Range("b237"),
False, False
   GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1", _
           "c12:p21", Sheets("UV PV  TM AMPV Data").Range("b14"),
False, False
   GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1", _
           "c12:p21", Sheets("UV PV  TM AMPV Data").Range("b26"),
False, False
   GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1",
_
           "c12:p21", Sheets("UV PV  TM AMPV Data").Range("b38"),
False, False
   GetData ThisWorkbook.Path & "\Country Specific\ca.xls", "Sheet1",
_
           "c13:p49", Sheets("ca").Range("c13"), False, False
   GetData ThisWorkbook.Path & "\demographic\cad.xls", "Sheet1", _
           "b9:n116", Sheets("cad").Range("b9"), False, False

Please provide insight into why this is not working in excel 2007

Thanks,
Eric
Oggy - 08 Apr 2008 21:35 GMT
> Hi:
>
[quoted text clipped - 34 lines]
> Thanks,
> Eric

I had a similar problem

Check your references, your code maybe calling for a 2003 reference.

ie Microsoft Excel 11.0 object library

Good Luck
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.