+ Reply to Thread
Results 1 to 5 of 5

Delete all given values gives wrong select?

  1. #1
    Registered User
    Join Date
    11-12-2007
    Location
    Dordrecht, Netherlands
    MS-Off Ver
    2016
    Posts
    35

    Delete all given values gives wrong select?

    Hi All,

    I would like to delete only given values in a specific area. This works fine with numbers, but with letters, I keep getting error 91. Can anyone help?

    Atttatchment contains the example (which does not fully ).

    Book2.zip
    Last edited by VBA Noob; 11-19-2007 at 09:14 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Reinder,

    You declare your variables MinimumValue and MaximumValue as Double. This is fine for numbers, but to test both text and numbers you need to declare your varaibles as Variant.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-12-2007
    Location
    Dordrecht, Netherlands
    MS-Off Ver
    2016
    Posts
    35
    Leith,

    Tnx a million, however.....it still does not seem to work as you can witness in the attatchment. It seems so simple....

    Book2.zip

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is the last example what you are trying, because the actual code is outside the Procedure and will error. Also, are you actually setting the MinimumValue and MaximumValue?

    Please Login or Register  to view this content.
    You could change it to
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    11-12-2007
    Location
    Dordrecht, Netherlands
    MS-Off Ver
    2016
    Posts
    35
    If I do that, then I get an error that there is a double declaration. Prtobably because I call the function like this?:

    Please Login or Register  to view this content.

+ 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