+ Reply to Thread
Results 1 to 2 of 2

Sorting data through VBA (Quick one!)

  1. #1
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Sorting data through VBA (Quick one!)

    Hey guys... I have two integers, i and j. They define the area of a selection as below... I need to sort the data, but I get an error, here is the code I am using:

    Please Login or Register  to view this content.
    And the error I get is...

    "Run-time error '1004': Application defined or object-defined error"

    Any ideas?

  2. #2
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    I found the following response that may very well relate to my problem, though I do not know how to define the constants, I know the values of them. But where and how do I define them. I tried using the module mentioned below however as I am on a work computer I cannot download or install any exe file. I'M STUCK! Please help :D

    You can either define the constants (xlDescending etc) yourself, or add a module to your project which the nice people at Microsoft provide (here) which contains them all.

    By the way, the fact you didn't know you had to define them is bad news - you were using undelcared variables, rather than the required constants. To stop this from happening again, you should add "Option Explicit" to the top of all of your code files (you can make this happen for any new code files, by setting "require variable declarations" in VB's options).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1