+ Reply to Thread
Results 1 to 10 of 10

Placing textbox value into save copy's cell...

  1. #1
    Registered User
    Join Date
    09-26-2010
    Location
    666th Layer of the Abyss
    MS-Off Ver
    Excel 2003
    Posts
    5

    Red face Placing textbox value into save copy's cell...

    First and foremost, allow me to say "hello" as this is my first post. I hail from a land known as Google where I seek a solution for my Excel trials and tribulations and when I saw the overall post counts, I figured this would be a good place to go for help...

    So anyway, here's my issue: How can I take what a text box contains and place it in a cell?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Placing textbox value into save copy's cell...

    Hello Wolf_22,

    Welcome to the Forum!

    Copying a TextBox value to cell is very easy. The example uses "A1" on "Sheet1" and assumes the text box is on a UserForm called "UserForm1". The code is the AfterUpdate event which occurs after the user presses the enter key. Change these names to match your needs.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-26-2010
    Location
    666th Layer of the Abyss
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Placing textbox value into save copy's cell...

    That helped, Leith, but now I'm having problems with the following:

    Please Login or Register  to view this content.
    Whenever I try to run the code, it keeps bombing with the following error message:
    "Run-time error '438':
    Object doesn't support this property or method"

    As I'm sure you can tell, I'm a complete novice to this VBA stuff, but the thing is that I'm a decent programmer with other languages (PHP, MySQL). I'm curious about how you pinpoint line-numbers in VBA because Microsoft's Visual Basic Editor doesn't seem to do very well with showing me (the complete buffoon) which line number the code breaks on here... So to compensate for this, I simply used a MsgBox statement before and after that line above--that's how I know it has something to do with this specific line (is this a good way to pinpoint trouble lines?).

    Anyway, any help with the above is very appreciative.

    Oh, and BTW: "drp_project" is a simple drop down list element. I had thought that using "Shapes(...)" was a good way to target it, but it seemed to fail, too... I'm at a loss.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Placing textbox value into save copy's cell...

    Hello Wolf_22,

    There are several different types of drop down lists. How did you create this one? Once I know that piece, I can give the correct code.

  5. #5
    Registered User
    Join Date
    09-26-2010
    Location
    666th Layer of the Abyss
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Placing textbox value into save copy's cell...

    Unless I'm mistaken, I believe I made it from the "Control Toolbox" where I then used "Validation" to populate the box from another sheet where the list was that I used for the options.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Placing textbox value into save copy's cell...

    Hello Wolf_22,

    Can you post the workbook? It will be easier for me to identify and follow what you have done.

  7. #7
    Registered User
    Join Date
    09-26-2010
    Location
    666th Layer of the Abyss
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Placing textbox value into save copy's cell...

    Sure, but beware that again, I'm new at this and what you behold is liable to startle you... Ha.
    Please Login or Register  to view this content.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Placing textbox value into save copy's cell...

    Hello Wolf_22,

    Thanks for posting the code. What I really wanted to see was the entire workbook. You have many different elements in this workbook. Seeing them will make it easier for me to identify what they are and what they are doing. Can you post a copy of the workbook?

  9. #9
    Registered User
    Join Date
    09-26-2010
    Location
    666th Layer of the Abyss
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Placing textbox value into save copy's cell...

    Leith, thanks for your patience with me on this.

    As for posting the workbook, sure, but give me a day to get my affairs in line (I'm currently scrambling with some homework and other stuff.) I'll try to post that tomorrow sometime when I get back from work and change some of the values around to protect identities, etc.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Placing textbox value into save copy's cell...

    Hello Wolf_22,

    Okay, not a problem. You know where I'll be.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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