+ Reply to Thread
Results 1 to 4 of 4

Can't troubleshoot selfmade function with F8 key in VBA editor

  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Can't troubleshoot selfmade function with F8 key in VBA editor

    I created my own function in the VBA editor but I can't step through the function to troubleshoot it when I press "F8" or click from the "DEBUG" menu. Sometimes I get the yellow highlight on the first line of code if I put in an error in the code so that the code won't compile. I used the function OK in one workbook and then copied and pasted into a different workbook. The function doesn't work 100% in the new workbook and I need to tweak it to a little difference in its use. I have Office 2003.

    Danny
    Last edited by TryToExcel; 08-12-2010 at 11:56 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can't troubleshoot selfmade function with F8 key in VBA editor

    What's the function? You can't press F8 to step into a function if it takes arguments, you need to set a breakpoint in the code.

    See http://www.cpearson.com/excel/Debug.htm
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Can't troubleshoot selfmade function with F8 key in VBA editor

    shg,

    here's the code

    Please Login or Register  to view this content.
    the argument is a cell that has several cells contents concatenated together. I want to know if the the cell being tested has only 1 instance of a letter in the concatenated string. I am using this function in several different locations in my spreadsheet

    Danny

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can't troubleshoot selfmade function with F8 key in VBA editor

    Select the first line of executable code, then press F9 to set a breakpoint.

+ 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