+ Reply to Thread
Results 1 to 5 of 5

Textbox value equals value of selected cell

Hybrid View

  1. #1
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Textbox value equals value of selected cell

    I was just about to submit before, then I saw that we made the same solution:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
        Dim LR As Long
        
        If Target.Count > 1 Then Exit Sub
        
        LR = Cells(Rows.Count, "D").End(xlUp).Row
    
        If UserForm1.Visible = True Then
            If Not Intersect(Target, Range("D2:D" & LR)) Is Nothing Then
                UserForm1.TextBox1.Text = Target.Value
            Else
                UserForm1.TextBox1.Text = vbNullString
            End If
        End If
    
    End Sub
    Last edited by berlan; 01-02-2014 at 06:44 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TextBox Value equals worksheet...
    By SunRunnerNY in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-19-2013, 10:47 AM
  2. [SOLVED] Define a Variable that equals the Row Number I have selected when I start the Macro
    By gle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-16-2013, 03:07 PM
  3. [SOLVED] Message box with VBA when cell selected AND other cell equals "X"
    By 97hills in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2013, 10:42 AM
  4. Display in a textbox, the character count of a cell, when the cell is selected
    By Pavan Renjal in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2013, 07:11 AM
  5. Highlight all Text in a Textbox when the textbox is selected
    By RPIJG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 03:28 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