Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2013, 05:47 PM
Registered User
 
Join Date: Jun 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Debugging in VBA Excel 2010 i want to step through the program line by line to see

I want to step through the program line by line to see how the program executeto find the problem i did press F8 and nothing happened? i never used excel 2010 debugger before, please help
i want to figureout why this program keeps looping and dont run correctly, thus stepping through line for line might help yet i dont know how this debugger work?

code Public Sub CommandButton1_Click()
Do
If vbYesNo = vbYes Then
Unload UserForm1

Exit Do
end if

Cells(2, 1) = TextBox1.Text



Loop Until MsgBox("Exit and Close this form?", vbYesNo)



End Sub/ code
 
Old June 6th, 2013, 08:20 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Can you try this

Code:
Private Sub CommandButton1_Click()
Do
ActiveSheet.Range("E1").Value = TextBox1.Text
If (MsgBox("Wish to Enter more value", vbYesNo) = vbNo) Then Unload Me
b1 = 1
Loop Until b1 = 1
End Sub
Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
ch6 (Data) p254 step 8 line 1 John Kauffman BOOK: Beginning Android 4 Application Development 1 April 26th, 2012 09:55 AM
Debugging with Command-line arguments V4D3R Visual Studio 2005 1 January 29th, 2008 02:55 AM
How to draw indicator line in owc line chart AlexOo General .NET 0 July 9th, 2007 10:32 PM
Excel VBA "Sheets(array(. . .))" code line hsheldon Excel VBA 5 June 6th, 2007 09:55 AM
Reading line by line from a .txt file x_ray VB.NET 2002/2003 Basics 5 February 10th, 2006 01:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.