+ Reply to Thread
Results 1 to 8 of 8

User-form, allow editing of cell value from textbox

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    User-form, allow editing of cell value from textbox

    Is there a property for a user-form textbox which allows editing of the cell associated with that textbox?

  2. #2
    Registered User
    Join Date
    12-19-2017
    Location
    Lisbon
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: User-form, allow editing of cell value from textbox

    I am not getting exactly what do you want to do.
    Do you want to use the textbox to edit a cell? To format it?

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: User-form, allow editing of cell value from textbox

    The userform textbox contains text equivalent to that in the cell.
    I want to edit the textbox and for edit to show at the cell.
    Last edited by Un-Do Re-Do; 12-19-2017 at 09:59 AM.

  4. #4
    Registered User
    Join Date
    12-19-2017
    Location
    Lisbon
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: User-form, allow editing of cell value from textbox

    So I assume you have the value for your TextBox assign on the userform iniciate sub.

    Just add the following code to the userform:

    Please Login or Register  to view this content.
    cmdAdd is the Command box you have to validate the change on the userform
    TextBox1 is your text box

  5. #5
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: User-form, allow editing of cell value from textbox

    Hi Excel_&_Help,

    Try in an Ordinary Code Module:
    Please Login or Register  to view this content.
    Try in the UserForm code module:
    Please Login or Register  to view this content.
    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    Lewis
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: User-form, allow editing of cell value from textbox

    The detail of what I'm trying to do is on another post: Link
    I have something similar to the line "Range("A3") = TextBox1.Value" in post #3 here. But it's giving me errors due to the additional complexities.
    I was was hoping there was a single line property such as found here: Link

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,439

    Re: User-form, allow editing of cell value from textbox

    The textbox use a ControlSource property that will directly link cell text to textbox text. It will not take into account mixed font formatting though, which I think is the whole point of what you are trying to do.
    Cheers
    Andy
    www.andypope.info

  8. #8
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: User-form, allow editing of cell value from textbox

    Hi Excel_&_Help,

    I posted a reply in your other link. I will no longer respond to any posts in this link.

    Link to your other post: https://www.excelforum.com/excel-pro...ml#post4805730

    I agree with Andy that mixing Font properties are not available in UserForm controls. There is allegedly a lnkEdit control that may do what you want. You are on your own if you want to pursue the lnkEdit control.

    Lewis

+ 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] textbox in a user form
    By grkchakri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2013, 05:18 AM
  2. [SOLVED] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  3. vba excel user form restrict input on user textbox
    By samz93 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2013, 04:38 PM
  4. Formula editing in textbox of user form- customized requirement need help
    By megha_gharote in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2013, 03:04 AM
  5. Prevent user from editing textbox but can copy.
    By Kiran2012 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2012, 03:24 AM
  6. User form with textbox assigned a cell value
    By Austin Zeagman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-15-2010, 01:22 PM
  7. Assigning cell contents to a textbox in a User Form
    By Jack Gillis in forum Excel General
    Replies: 2
    Last Post: 06-08-2005, 11:05 AM
  8. [SOLVED] Editing Number Input on a User Form
    By Don Wiss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2005, 12:06 AM

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