Microsoft Excel, SQL & Internet Tips : How to Use a Do-While Loop in Excel VBA

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
15,636
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Nov 17, 2008

When using Excel's VBA, or visual basic editor, create a code that runs when a worksheet is activated and use a do-while loop that has an end condition. Use a do-while loop in Excel VBA with tips from a software developer in this free video on using Microsoft Excel.

Expert: Dave Andrews
Contact: www.daveandrews.org
Bio: Dave Andrews is a software developer that holds a degree in computer science. Currently, he is employed by a government IT department.
Filmmaker: Tim Brown

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (9)

Sign In or Sign Up now to post a comment!
  • Hi, could plz help me, I am trying to create a macro to run automatically everytime I change the cells value like " if range ("E7") = "cnh" then" I want to execute the macro if E7 = "cnh" or else exit sub. I hope you have understood me, thank you so much

  • Hello, I think if you dont know nobody does, so, is there a way to create a macro to set up the macro security level to "down" automatically, because threre are many users dont know how to do it, thank you very much..(sorry for my english, I am brazilian)

  • Thanks to put subtitle, I am brazilian and dont understand english very well, but this time was so easy, thank you so much

  • So how do I get the entry to go to the next "Row" if there is text in the line it is coded to be entered on?

  • **********Private Sub BtnSave_Click()

    Dim WS As Worksheet

    Set WS = ActiveWorkbook.Sheets("VENDOR DRAWING LOG") WS.Cells(3, 2).Value = TxtMachNo.Text WS.Cells(3, 3).Value = TxtModelNo.Text WS.Cells(3, 4).Value = TxtDrawNo.Text WS.Cells(3, 5).Value = TxtDrawDesc.Text WS.Cells(3, 6).Value = TxtRevision.Text WS.Cells(3, 12).Value = TxtRFI.Text WS.Cells(3, 13).Value = TxtRfiInfo.Text WS.Cells(3, 14).Value = TxtTransNo.Text WS.Cells(3, 15).Value = DTPicker1.Value End Sub*********

  • Very helpful to me as well. I am having trouble and thought this would answer my question, but it did not. I have a "Workbook" with two "Forms" in it that I use for data entry. But I can only get the entries to "Write" to the first row of the sheet. Whenever I add new data it will overwrite the existing entry in that line. I'll post the code in the next comment....

  • Good work man!

    The video is clear and straight.

    Thanks!

  • Cheers dude, this is really helpful, clear and consise

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more