+ Reply to Thread
Results 1 to 7 of 7

Textbox control

  1. #1
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Textbox control

    How can I put the value of Sheet2 Range A1 and A2 into a text box control in Sheet1?
    So that, whenever I update the value of Sheet2 Range A1 and A2, the value of text box will also be updated. Thank you

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Textbox control

    One way is to put the following code on the Sheet2 Module.
    Right click the Sheet2 Tab --> View Code --> Paste the following code into the opened code window --> Close the VBA editor --> Save your workbook as Macro-Enabled Workbook.

    Please Login or Register  to view this content.
    For details, refer to the attached.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: Textbox control

    Hi! thank you for the help. I would also like to put the value of Sheet2 Range A1 and A2 into the same text box. and also the value of Sheet2 Range A2 and A2. so on and so forth. up to Sheet2 Range A12 and B12

    But I would like them to appear like this

    Example
    Sheet2 Range A1 and B1
    Sheet2 Range A2 and B2
    Sheet2 Range A3 and C3

    For every row, they would appear on the next line. Please help. thank you

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Textbox control

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: Textbox control

    thanks, it worked. I also did click the * button

  6. #6
    Registered User
    Join Date
    06-04-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    8

    Re: Textbox control

    Instead of starting at A1, I want to start at A2, but when I replace the value

    If Not Intersect(Target, Range("A1:B12")) Is Nothing Then

    to this

    If Not Intersect(Target, Range("A2:B12")) Is Nothing Then

    why is it copying the value of Sheet2 Range A1?

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Textbox control

    First of all thanks for the rep.
    About your question.
    Please Login or Register  to view this content.

+ 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. [SOLVED] How to control added textbox?
    By alee001 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-25-2015, 09:55 AM
  2. Help with Textbox control Please!
    By JJFletcher in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2014, 09:22 PM
  3. Help with Textbox control Please!
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-17-2014, 04:57 PM
  4. [SOLVED] How to set Max and Min value to control the TextBox
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-10-2014, 01:29 AM
  5. Regarding TextBox Control
    By skonduru in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-29-2010, 09:33 AM
  6. Textbox control
    By bhodge10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2007, 12:11 AM
  7. Textbox Control Source
    By tess457 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 08:07 PM

Tags for this Thread

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