Programme doesn't work when sent to a different computer - Why?

Wolfy71

New Member
Joined
May 5, 2009
Messages
14
Hi,

I have a programme which works fine on my computer at home but when I send it via email to work the 'sort' function messes up (there is a chance it could be the 'vlookup' function, though) and all the cells in the sort range lose their formula reference - which is of course a tad annoying.

The part of the programme I'm having difficulty with is this:

Range("SsNo1").Resize(d, f).Offset(a, 0).Select
Selection.Sort Key1:=Range("FRSet1"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Looking around on the net, I think the problem may lie with the fact I haven't yet named my project file and this is causing the above not to be recognized on the new computer - but I'm still confused about the steps I should take and what I should be looking for... :confused:

Any ideas about which proverbial tree I should be barking up, here?

Thank you in advance

Adam
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Just a thought, are you using Excel 2007 at work?

If so Range("SsNo1") is a cell reference (SSN1) as well as your range name, try giving this range a different name but watch out for names with 3 letters and a number!
 
Upvote 0
Hi Adam,

This part of your code.

Code:
Range("SsNo1").Resize(d, f).Offset(a, 0).Select
Selection.Sort Key1:=Range("FRSet1"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Delete the last statement.

Code:
Range("SsNo1").Resize(d, f).Offset(a, 0).Select
Selection.Sort Key1:=Range("FRSet1"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Hope this helps.
 
Upvote 0
Well that's the strange thing both packages are Excel 2003.

I can understand named ranges getting confused but would it still do so with three letters and a number?

You don't think it's because I haven't named the project and assigned modules, then? (Andy B)

Thanks LucB I'll try that and keep you posted (So to speak.)
 
Last edited:
Upvote 0
Adam

How does the Sort not work?

What VLOOKUP(s) are you referring to?

By the way the only naming issue I can imagine could be if you named 2 things the same,and I don't think that would even apply to projects/modules.

One thing you might want to check is the named ranges.

Also you could try not using Select/Selection.
Code:
Range("SsNo1").Resize(d, f).Offset(a, 0).Sort Key1:=Range("FRSet1"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
 
Upvote 0
No - thanks but your suggestions didn't work out. Having looked at it again though - I think it may be to do with not recognizing a date (I tried sorting manually and it messed up again - and I think that is something to do with add-ins.)

Sorry if I've been leading you up the primrose path...

Any ideas on add-ins and dates? :cool:

Regards,

Adam
 
Upvote 0
Where do addins come into this? There shouldn't be a problem with dates stored as dates (unless you go from Mac to PC or vice versa) but if you used a DATEVALUE formula, that could go wrong depending on the regional settings; a DATE formula is preferable.
 
Upvote 0
Where do addins come into this? There shouldn't be a problem with dates stored as dates (unless you go from Mac to PC or vice versa) but if you used a DATEVALUE formula, that could go wrong depending on the regional settings; a DATE formula is preferable.

This has turned into a bit of a cross-post

http://www.mrexcel.com/forum/showthread.php?t=388395

but I'm guessing formulae using eg "31/12/2008"+0 would also produce the same issues.
 
Upvote 0
I'm sure the problem is to do with the dates, Rory. I'm trying to sort a range of data automatically, within the range there are two columns; one lists dates and the other turns the dates into a general number - the latter is the list which goes wrong. Some of the numbers in the second column refer to the first column fine - others, however, return '#VALUE!' and I can't find the right formatting for it...
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,086
Members
448,944
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top