2002-2000 (or VB6.3-VB6.0) problem

J

John Meers

I have a macro in a spreadsheet in my machine (Office XP) produced using
Record Macro. On a friends machine (Office 2000) it fails at the following
line

Selection.SORT Key1:=Range("o3"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

with 'xlSortNormal' highlighted. Anyone throw any light on this.
He seems to have VB6.0 while mine is 6.3 if that is relevant

Saving the sheet on my machine as 'Excel 97-2002 & 5.0/95 Workbook' does not
seem to alter the macro.
 
D

Dave Peterson

dataoption# was added in xl2002. Remove it and you'll be set.

(it lets you override how to treat numbers that are stored as text. But since
you're using xlsortnormal, it pretty much doesn't matter.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top