+ Reply to Thread
Results 1 to 7 of 7

Require vba solution for text box "text" transfer to cell

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Brantford, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Require vba solution for text box "text" transfer to cell

    I have the first problem with this issue solved. I am transferring text typed into a "text box" to a cell with this piece of vba.
    Please Login or Register  to view this content.
    To be clear - the text box named "R_BW_FOcus" transfers the text to cell A114.

    THE PROBLEM
    After the user types the text in the text box I need the code above to transfer the text to the cell A114. The only way I know how to do this is to create a button and get the user to click the button to activate the the vba to transfer the text.

    My issue here is if the user forgets to press the button, the text won't transfer. I would like some vba that will automatically transfer the text with out the user having to do anything to play the macro.
    Last edited by Cutter; 08-22-2012 at 02:49 PM. Reason: Added code tags

  2. #2
    Registered User
    Join Date
    07-29-2010
    Location
    Indiana
    MS-Off Ver
    Excel 2003, 2010, 2013
    Posts
    51

    Re: Require vba solution for text box "text" transfer to cell

    Have you tried using the Worksheet_Change() event? By putting your VBA code there it will run every time the sheet is changed (such as when the active cell is changed). That way, you won't have to code a button, and the code will run every time something with the sheet changes.

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    Brantford, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Require vba solution for text box "text" transfer to cell

    That sounds like exactly what I need. I'm trying to make it work now but I'm not getting it right. I went into module 1 and typed the following:
    Please Login or Register  to view this content.
    Was writing it in Module 1 incorrect or is the way I have it written incorrect? Sorry I should mention I'm a "figure it out as you go" vba guy with no real formal training.

    **note - to be clear the "omit" is there as a replacement for the purposes of posting
    Last edited by Cutter; 08-22-2012 at 02:49 PM. Reason: Added code tags

  4. #4
    Registered User
    Join Date
    08-13-2012
    Location
    Brantford, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Require vba solution for text box "text" transfer to cell

    I'm wondering if it is not working because the data change is in a text box and not a cell....

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Require vba solution for text box "text" transfer to cell

    @ Kartman

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  6. #6
    Registered User
    Join Date
    08-13-2012
    Location
    Brantford, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Require vba solution for text box "text" transfer to cell

    Thanks for the heads up Cutter - I will be sure to apply the code tags in future
    Last edited by Cutter; 08-22-2012 at 03:24 PM. Reason: Removed whole post quote

  7. #7
    Registered User
    Join Date
    08-13-2012
    Location
    Brantford, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Require vba solution for text box "text" transfer to cell

    Due to the fact I am using text boxes to transfer text to a cell the Worksheet Change suggestion above would not work. Instead when the user hits the save button the macro is called on to transfer the text from the text box to the cell.

    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)

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