+ Reply to Thread
Results 1 to 5 of 5

routine not working - wrong string variable result

  1. #1
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    routine not working - wrong string variable result

    can i get help with my code? i have reviewed it 5 times and i think it is correct. but it is giving me the wrong result. some strings are ending up as the wrong lengths after the loop, but the code is fine. i attached the files. thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: routine not working - wrong string variable result

    Try this change:

    Please Login or Register  to view this content.

    If that's okay, you can adapt it to your other Case statements.
    多么想要告诉你 我好喜欢你

  3. #3
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: routine not working - wrong string variable result

    yes it works! thank you so much. =) can you tell me why mine was not? i don't understand.

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: routine not working - wrong string variable result

    Probably because of wrong starting positions and whatnot with the InStr functions, I don't have much time to debug it to fix your code. Anyway, recoding it and using the Split is way easier and more efficient.

  5. #5
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: routine not working - wrong string variable result

    yes. thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pass a variable result from on Sub routine to another
    By williamkwells in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2020, 03:43 PM
  2. [SOLVED] Max Date for Row - but not working - 01/00/00 result - what am I doing wrong?
    By LittleMzBiteMe in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-21-2016, 02:30 PM
  3. How to get query result into string variable
    By Mahi007 in forum Access Tables & Databases
    Replies: 1
    Last Post: 12-10-2015, 05:53 PM
  4. Pass a variable from one sub-routine to another sub-routine
    By gowtham_pec in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-01-2013, 07:07 PM
  5. Calling routine with name stored in string variable
    By Helge in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2011, 12:07 PM
  6. Function only working with string variable
    By Evilbungle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2010, 05:12 AM
  7. [SOLVED] Drop-down list triggering the wrong routine
    By Broadband Al in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 06:10 PM

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