Microsoft Office Forums


Reply
Thread Tools Display Modes

macro compatibility

 
 
efader
Guest
Posts: n/a
 
      04-08-2008, 08:19 PM
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", _
"c1221", Sheets("UV PV TM AMPV Data").Range("b2"),
False, False
GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1", _
"d1010", Sheets("Summary Raw Data").Range("b237"),
False, False
GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1", _
"c1221", Sheets("UV PV TM AMPV Data").Range("b14"),
False, False
GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1", _
"c1221", Sheets("UV PV TM AMPV Data").Range("b26"),
False, False
GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1",
_
"c1221", Sheets("UV PV TM AMPV Data").Range("b38"),
False, False
GetData ThisWorkbook.Path & "\Country Specific\ca.xls", "Sheet1",
_
"c1349", 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
 
Reply With Quote
 
 
 
 
Oggy
Guest
Posts: n/a
 
      04-08-2008, 08:35 PM
On 8 Apr, 21:19, efader <eric.fa...@gmail.com> wrote:
> 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", _
> * * * * * * "c1221", Sheets("UV PV *TM AMPV Data").Range("b2"),
> False, False
> * * GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1", _
> * * * * * * "d1010", Sheets("Summary Raw Data").Range("b237"),
> False, False
> * * GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1", _
> * * * * * * "c1221", Sheets("UV PV *TM AMPV Data").Range("b14"),
> False, False
> * * GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1", _
> * * * * * * "c1221", Sheets("UV PV *TM AMPV Data").Range("b26"),
> False, False
> * * GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1",
> _
> * * * * * * "c1221", Sheets("UV PV *TM AMPV Data").Range("b38"),
> False, False
> * * GetData ThisWorkbook.Path & "\Country Specific\ca.xls", "Sheet1",
> _
> * * * * * * "c1349", 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
 
Reply With Quote
 
kene akubue
Guest
Posts: n/a
 
      05-21-2010, 01:31 PM
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",
"c1221", Sheets("UV PV TM AMPV Data").Range("b2")
False, Fals
GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1",
"d1010", Sheets("Summary Raw Data").Range("b237")
False, Fals
GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1",
"c1221", Sheets("UV PV TM AMPV Data").Range("b14")
False, Fals
GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1",
"c1221", Sheets("UV PV TM AMPV Data").Range("b26")
False, Fals
GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1"

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

"c1349", 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:

On Thursday, April 10, 2008 2:46 AM
efader wrote:

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",
"c1221", Sheets("UV PV TM AMPV Data").Range("b2")
False, Fals
GetData ThisWorkbook.Path & "\competitive\uv\ca.xls", "Sheet1",
"d1010", Sheets("Summary Raw Data").Range("b237")
False, Fals
GetData ThisWorkbook.Path & "\competitive\pv\ca.xls", "Sheet1",
"c1221", Sheets("UV PV TM AMPV Data").Range("b14")
False, Fals
GetData ThisWorkbook.Path & "\competitive\tm\ca.xls", "Sheet1",
"c1221", Sheets("UV PV TM AMPV Data").Range("b26")
False, Fals
GetData ThisWorkbook.Path & "\competitive\ampv\ca.xls", "Sheet1"

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

"c1349", 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

On Thursday, April 10, 2008 2:46 AM
Oggy wrote:

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/tutorials...ta-grids-.aspx
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
::: Sort macro with empty lines at the end. ::: Macro de tri avec lignes vide en bas. infojacques@gmail.com Excel Newsgroup 2 07-05-2007 10:40 AM
Macro doesn't work on form or Macro timing and locked table Mike Access Newsgroup 1 05-25-2007 02:47 PM
Excel Macro - Assistance required to modify existing Macro. MCCAFFREY Excel Newsgroup 3 05-22-2007 02:33 AM
255 Character Truncation, Vlookup Macro vs. Opening Workbook Macro jrew23@yahoo.com Excel Newsgroup 1 02-26-2005 04:59 PM
Macro compatibility in xls2003 Peter Andersen Excel Newsgroup 11 02-01-2005 06:03 PM



All times are GMT. The time now is 02:28 PM.
Microsoft Office Forums is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92