PC Review


Reply
Thread Tools Rate Thread

Debugging Help

 
 
David
Guest
Posts: n/a
 
      5th Oct 2007
Has anyone got any good tips for debugging VBA?

I've got a complex piece of code and I've tried using MsgBox which is
OK, but not ideal as I can't look around the Worksheets while the box
is displayed.

Any useful commands or other methods that can be use?

Thanks!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      5th Oct 2007
a few suggestion

1) add print.debug a and see results in immediate window. You need to go to
view menu and add immediate
2) Add break points using F9.
3) Step through code using F8.
4) Add variable to watch window.
5) For large loops add extra code

For RowCount = 1 to 1000

'added test code
if rowCount = 247 then
'set break point here
a = 1
end if
' end of test code

next RowCount
"David" wrote:

> Has anyone got any good tips for debugging VBA?
>
> I've got a complex piece of code and I've tried using MsgBox which is
> OK, but not ideal as I can't look around the Worksheets while the box
> is displayed.
>
> Any useful commands or other methods that can be use?
>
> Thanks!
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I skip debugging Ajax when debugging my code? AAaron123 Microsoft ASP .NET 3 28th Jul 2009 05:07 PM
debugging =?Utf-8?B?YmFmZmxlZA==?= Microsoft Word New Users 1 6th Oct 2007 01:07 AM
Help Debugging =?Utf-8?B?S2liYQ==?= Microsoft Excel Programming 12 21st May 2007 07:27 PM
Start Without Debugging(CTRL F5) 3x slower than Start With Debugging(F5)! lostnewmexico@yahoo.com Microsoft VC .NET 9 22nd Feb 2006 06:14 PM
No Debugging of C# Server-Side Script, but Code-Behind Debugging Works Johann Blake Microsoft ASP .NET 1 5th Jan 2004 03:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:47 PM.