ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2007 VB to Excel 2003 VB (https://www.excelbanter.com/excel-discussion-misc-queries/193089-excel-2007-vbulletin-excel-2003-vbulletin.html)

DanF

Excel 2007 VB to Excel 2003 VB
 
Howdy

I've got a worksheet I created in Excel 2007, and saved as a .xls (Excel
'97-2003) with a macro that uses the following line of code:


ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear

When I run the sheet in Excel 2003, it bungs out an error that states
"Object doesn't support this property or method"

I don't think this PC has been updated since it got built as it's supposed
to be 'offline', so would an update fix it, or am I going to have to figure
out another way of making my code work?

Cheers peeps
Dan

DanF

Excel 2007 VB to Excel 2003 VB
 
It's OK, I've changed the code to the way the Office 2003 PC wants to see it.

I hope there isn't any more little surprises like this!

"DanF" wrote:

Howdy

I've got a worksheet I created in Excel 2007, and saved as a .xls (Excel
'97-2003) with a macro that uses the following line of code:


ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear

When I run the sheet in Excel 2003, it bungs out an error that states
"Object doesn't support this property or method"

I don't think this PC has been updated since it got built as it's supposed
to be 'offline', so would an update fix it, or am I going to have to figure
out another way of making my code work?

Cheers peeps
Dan


Jim Rech

Excel 2007 VB to Excel 2003 VB
 
I hope there isn't any more little surprises like this!

Why not? Do you think MS should not make object model changes because they
will not work in earlier versions? It would be hard to add features
wouldn't it?

--
Jim
"DanF" wrote in message
...
| It's OK, I've changed the code to the way the Office 2003 PC wants to see
it.
|
| I hope there isn't any more little surprises like this!
|
| "DanF" wrote:
|
| Howdy
|
| I've got a worksheet I created in Excel 2007, and saved as a .xls (Excel
| '97-2003) with a macro that uses the following line of code:
|
|
|
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
|
| When I run the sheet in Excel 2003, it bungs out an error that states
| "Object doesn't support this property or method"
|
| I don't think this PC has been updated since it got built as it's
supposed
| to be 'offline', so would an update fix it, or am I going to have to
figure
| out another way of making my code work?
|
| Cheers peeps
| Dan



DanF

Excel 2007 VB to Excel 2003 VB
 
Thats not the point my friend.

If you create and save the file as a '97 - '03 format i would expect it to
inform me of possible problems.

There's no need for the condescending comments.


"Jim Rech" wrote:

I hope there isn't any more little surprises like this!


Why not? Do you think MS should not make object model changes because they
will not work in earlier versions? It would be hard to add features
wouldn't it?

--
Jim
"DanF" wrote in message
...
| It's OK, I've changed the code to the way the Office 2003 PC wants to see
it.
|
| I hope there isn't any more little surprises like this!
|
| "DanF" wrote:
|
| Howdy
|
| I've got a worksheet I created in Excel 2007, and saved as a .xls (Excel
| '97-2003) with a macro that uses the following line of code:
|
|
|
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
|
| When I run the sheet in Excel 2003, it bungs out an error that states
| "Object doesn't support this property or method"
|
| I don't think this PC has been updated since it got built as it's
supposed
| to be 'offline', so would an update fix it, or am I going to have to
figure
| out another way of making my code work?
|
| Cheers peeps
| Dan




Jim Rech

Excel 2007 VB to Excel 2003 VB
 
No condescension intended. Although Excel does warn of lost features in
Excel proper it does not re VBA code. The Excel warning is for features the
file format itself does not support. The VB file format does support the
retaining of all object methods, etc. It isn't until it arrives in a
specific version of Excel that the problem arises.

Remember that VB changes with every version of Excel and there is no way to
know what version of Excel you will be opening the XLS in. So you'd have to
get a warning for every line of code that wouldn't work in Excel 2003, 2002,
2000 and 97 separately since the XLS file could be opened in any of them.
What a nightmare I'm sure you'd agree, my friend.

--
Jim
"DanF" wrote in message
...
| Thats not the point my friend.
|
| If you create and save the file as a '97 - '03 format i would expect it to
| inform me of possible problems.
|
| There's no need for the condescending comments.
|
|
| "Jim Rech" wrote:
|
| I hope there isn't any more little surprises like this!
|
| Why not? Do you think MS should not make object model changes because
they
| will not work in earlier versions? It would be hard to add features
| wouldn't it?
|
| --
| Jim
| "DanF" wrote in message
| ...
| | It's OK, I've changed the code to the way the Office 2003 PC wants to
see
| it.
| |
| | I hope there isn't any more little surprises like this!
| |
| | "DanF" wrote:
| |
| | Howdy
| |
| | I've got a worksheet I created in Excel 2007, and saved as a .xls
(Excel
| | '97-2003) with a macro that uses the following line of code:
| |
| |
| |
|
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
| |
| | When I run the sheet in Excel 2003, it bungs out an error that
states
| | "Object doesn't support this property or method"
| |
| | I don't think this PC has been updated since it got built as it's
| supposed
| | to be 'offline', so would an update fix it, or am I going to have to
| figure
| | out another way of making my code work?
| |
| | Cheers peeps
| | Dan
|
|
|



DanF

Excel 2007 VB to Excel 2003 VB
 
"So you'd have to get a warning for every line of code that wouldn't work in
Excel 2003, 2002, 2000 and 97 separately since the XLS file could be opened
in any of them."

Yeah, or it could ask you when you first save your file as a '.xls' what
version of Excel you intend to run the spreadsheet on, and set the version of
VB accordingly.

Or if that's not possible, display a warning with a link to a KB article
that can show (or at least point to) the differences between the differing
versions.

Why have the option of saving the file as a '97-'2003 version if it's not
going to work?? Why does it allow me to code macros that aren't recognised in
Excel 2003 - even though I've saved it as a 2003 doc?

I've got a lot of time for Microsoft, and for what they've done for the
software community - Visual Studio is one of my all time favourite bits of
kit - but I think that this needs some attention.



"Jim Rech" wrote:

No condescension intended. Although Excel does warn of lost features in
Excel proper it does not re VBA code. The Excel warning is for features the
file format itself does not support. The VB file format does support the
retaining of all object methods, etc. It isn't until it arrives in a
specific version of Excel that the problem arises.

Remember that VB changes with every version of Excel and there is no way to
know what version of Excel you will be opening the XLS in. So you'd have to
get a warning for every line of code that wouldn't work in Excel 2003, 2002,
2000 and 97 separately since the XLS file could be opened in any of them.
What a nightmare I'm sure you'd agree, my friend.

--
Jim
"DanF" wrote in message
...
| Thats not the point my friend.
|
| If you create and save the file as a '97 - '03 format i would expect it to
| inform me of possible problems.
|
| There's no need for the condescending comments.
|
|
| "Jim Rech" wrote:
|
| I hope there isn't any more little surprises like this!
|
| Why not? Do you think MS should not make object model changes because
they
| will not work in earlier versions? It would be hard to add features
| wouldn't it?
|
| --
| Jim
| "DanF" wrote in message
| ...
| | It's OK, I've changed the code to the way the Office 2003 PC wants to
see
| it.
| |
| | I hope there isn't any more little surprises like this!
| |
| | "DanF" wrote:
| |
| | Howdy
| |
| | I've got a worksheet I created in Excel 2007, and saved as a .xls
(Excel
| | '97-2003) with a macro that uses the following line of code:
| |
| |
| |
|
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
| |
| | When I run the sheet in Excel 2003, it bungs out an error that
states
| | "Object doesn't support this property or method"
| |
| | I don't think this PC has been updated since it got built as it's
| supposed
| | to be 'offline', so would an update fix it, or am I going to have to
| figure
| | out another way of making my code work?
| |
| | Cheers peeps
| | Dan
|
|
|




prachi pandey

It's OK, I've changed the code to the way the Office 2003 PC wantsto see it.
 
Hi,

Can you tell me what was the fix you did to remove this error. I am too getting the same problem.


Thanks
Prachi

On Monday, June 30, 2008 6:18 AM Dan wrote:


Howdy

I've got a worksheet I created in Excel 2007, and saved as a .xls (Excel
'97-2003) with a macro that uses the following line of code:


ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear

When I run the sheet in Excel 2003, it bungs out an error that states
"Object doesn't support this property or method"

I don't think this PC has been updated since it got built as it's supposed
to be 'offline', so would an update fix it, or am I going to have to figure
out another way of making my code work?

Cheers peeps
Dan



On Monday, June 30, 2008 6:56 AM Dan wrote:


it is OK, I have changed the code to the way the Office 2003 PC wants to see it.

I hope there is not any more little surprises like this!

"DanF" wrote:



On Monday, June 30, 2008 8:46 AM Jim Rech wrote:


Why not? Do you think MS should not make object model changes because they
will not work in earlier versions? It would be hard to add features
wouldn't it?

--
Jim
"DanF" wrote in message
...
it.
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
supposed
figure



On Monday, June 30, 2008 9:00 AM Dan wrote:


Thats not the point my friend.

If you create and save the file as a '97 - '03 format i would expect it to
inform me of possible problems.

There's no need for the condescending comments.


"Jim Rech" wrote:



On Monday, June 30, 2008 9:27 AM Jim Rech wrote:


No condescension intended. Although Excel does warn of lost features in
Excel proper it does not re VBA code. The Excel warning is for features the
file format itself does not support. The VB file format does support the
retaining of all object methods, etc. It isn't until it arrives in a
specific version of Excel that the problem arises.

Remember that VB changes with every version of Excel and there is no way to
know what version of Excel you will be opening the XLS in. So you'd have to
get a warning for every line of code that wouldn't work in Excel 2003, 2002,
2000 and 97 separately since the XLS file could be opened in any of them.
What a nightmare I'm sure you'd agree, my friend.

--
Jim
"DanF" wrote in message
...
they
see
(Excel
ActiveWorkbook.Worksheets(combinedEMDataTypes).Aut oFilter.Sort.SortFields.Clear
states



On Monday, June 30, 2008 10:04 AM Dan wrote:


"So you'd have to get a warning for every line of code that wouldn't work in
Excel 2003, 2002, 2000 and 97 separately since the XLS file could be opened
in any of them."

Yeah, or it could ask you when you first save your file as a '.xls' what
version of Excel you intend to run the spreadsheet on, and set the version of
VB accordingly.

Or if that's not possible, display a warning with a link to a KB article
that can show (or at least point to) the differences between the differing
versions.

Why have the option of saving the file as a '97-'2003 version if it's not
going to work?? Why does it allow me to code macros that aren't recognised in
Excel 2003 - even though I've saved it as a 2003 doc?

I've got a lot of time for Microsoft, and for what they've done for the
software community - Visual Studio is one of my all time favourite bits of
kit - but I think that this needs some attention.



"Jim Rech" wrote:






All times are GMT +1. The time now is 10:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com