+ Reply to Thread
Results 1 to 2 of 2

Debugging VBA

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

    Debugging VBA

    The purpose of this thread is to assist users in debugging VBA. It's intended to be a source of links in other threads to which we can vector members for basic debugging. Learning to debug is the very best way to improve your coding skills, and I invite participation by all members who provide accurate, useful, and concise descriptions of methods.

    This is not a question forum, and all questions will be unceremoniously deleted. If you have a question, start a new thread and provide a link in the relevant post in this thread.

    For starters, I highly commend http://www.cpearson.com/excel/Debug.htm as a point of departure.
    Last edited by shg; 06-30-2010 at 12:38 AM.
    Entia non sunt multiplicanda sine necessitate

  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: Debugging VBA

    The Evaluate function is a powerful capability of VBA to modify contiguous ranges without loops, and Forum Guru DonkeyOte is particularly adept in its use. Here's an example of mine from http://www.excelforum.com/excel-prog...-function.html.
    Please Login or Register  to view this content.
    The point of the example is not to explain the problem it solves. Rather, the purpose it to show that the formula to be evaluated is first constructed as a string, which is then (in the statement that is commented out) printed to the Immediate window to verify that it is well-formed and appropriate. It's easier to look at the formula in the Immediate window than to try to sort out a run-time 1004 error without ever seeing the problematic formula.
    Last edited by shg; 07-05-2010 at 01:04 AM. Reason: deleted unneeded declaration as noted by foxguy

+ 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