macro compatibility

  • Thread starter Thread starter efader
  • Start date Start date
E

efader

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
 
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

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
 
Testing



efader wrote:

macro compatibility
10-Apr-08

Hi

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

It works in excel 2003, however does not work in excel 2007. In exce
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, Fals
GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1",
"d10:p10", Sheets("Summary Raw Data").Range("b237")
False, Fals
GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1",
"c12:p21", Sheets("UV PV TM AMPV Data").Range("b14")
False, Fals
GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1",
"c12:p21", Sheets("UV PV TM AMPV Data").Range("b26")
False, Fals
GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1"

"c12:p21", Sheets("UV PV TM AMPV Data").Range("b38")
False, Fals
GetData ThisWorkbook.Path & "\Country Specific\ca.xls", "Sheet1"

"c13:p49", Sheets("ca").Range("c13"), False, Fals
GetData ThisWorkbook.Path & "\demographic\cad.xls", "Sheet1",
"b9:n116", Sheets("cad").Range("b9"), False, Fals

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

Thanks
Eric

Previous Posts In This Thread:

macro compatibility
Hi

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

It works in excel 2003, however does not work in excel 2007. In exce
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, Fals
GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1",
"d10:p10", Sheets("Summary Raw Data").Range("b237")
False, Fals
GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1",
"c12:p21", Sheets("UV PV TM AMPV Data").Range("b14")
False, Fals
GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1",
"c12:p21", Sheets("UV PV TM AMPV Data").Range("b26")
False, Fals
GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1"

"c12:p21", Sheets("UV PV TM AMPV Data").Range("b38")
False, Fals
GetData ThisWorkbook.Path & "\Country Specific\ca.xls", "Sheet1"

"c13:p49", Sheets("ca").Range("c13"), False, Fals
GetData ThisWorkbook.Path & "\demographic\cad.xls", "Sheet1",
"b9:n116", Sheets("cad").Range("b9"), False, Fals

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

Thanks
Eric

Re: macro compatibility
b2")
)
b14")
b26")
b38")


I had a similar proble

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

ie Microsoft Excel 11.0 object librar

Good Luck


Submitted via EggHeadCafe - Software Developer Portal of Choice
Distributed Data Grids - Share Objects Between Windows Service and ASP.NET
http://www.eggheadcafe.com/tutorial...b7a-1bb00e33db07/distributed-data-grids-.aspx
 
Back
Top