Results 1 to 7 of 7

Repeatedly click a cmdButton to populate a TextBox with different cell values

Threaded View

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    6

    Repeatedly click a cmdButton to populate a TextBox with different cell values

    Hi I'm new here
    First post. Thanks for reading it.

    I'm trying to achieve the following but I'm stumped;
    Each time the user clicks the cmdButton, the value of the next cell in the column is displayed in the TextBox.
    (The user will eventually come across a value in the TextBox that he or she is looking for and select it)

    Here is my non-working novice code;

    Dim DriverName As String
    Dim i As Integer
    Dim c As Integer
    Dim ws As Worksheet
    Set ws = Worksheets("Incomplete")
    
    i = 0
    
    Do
       i = i + 1
                    If ws.Cells(i, 2).Value <> "" Then
                                  c = c + 1
                    End If
    
    Loop Until ws.Cells(i, 2) = ""
    
    For i = 2 To c
    
                 DriverName = ws.Cells(i, 4).Value
    
    Next i
    
    txtShowDriverName.Value = DriverName
    Last edited by LordBucketHead; 10-26-2013 at 03:09 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel VBA Help On Textbox,Cmdbutton to Move Data
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 07:35 AM
  2. [SOLVED] Copy and paste set of rows repeatedly at click of button
    By RoxanaN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2013, 02:30 AM
  3. put the value in a textbox and populate relative values in other textboxes automatically
    By sharad.sony in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2013, 03:15 AM
  4. [SOLVED] VBA Find, populate textbox, click command, findnext, display
    By ozhally in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2012, 09:39 PM
  5. [SOLVED] Click on cell, populate another in VBA
    By manwi004 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-29-2012, 09:42 PM

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