+ Reply to Thread
Results 1 to 3 of 3

Userform, transfer string to cell, preserve formatting

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

    Userform, transfer string to cell, preserve formatting

    With this form, it allows cells to be modified (via a userform) to add certain characters such as Greek letters. It works quite well.
    Is there a way to type in characters on the form and transfer to cell.
    The criteria is that: Formatting in the cell needs to be preserved, such as text colour and font height.


    MODULE CODE
    Please Login or Register  to view this content.

    CLASS MODULE ClassFormulasDelegate
    Please Login or Register  to view this content.

    CLASS MODULE ClassFormulasEvents
    Please Login or Register  to view this content.
    FORM CODE
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Userform, transfer string to cell, preserve formatting

    I've gotten to the point where characters are automatically transferred to cell, as you type in the userform textbox.
    The outstanding part is: Formatting in the cell needs to be preserved. I would allow only for the font property to be stored, forgetting about other properties. See "Sub transfer()" in form code. I'm guessing an array is needed to store font of each character.

    MODULE
    Please Login or Register  to view this content.
    CLASS MODULE ClassFormulasDelegate
    Please Login or Register  to view this content.
    CLASS MODULE ClassFormulasEvents
    Please Login or Register  to view this content.


    CLASS MODULE clsTextBox
    Please Login or Register  to view this content.
    FORM CODE
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Userform, transfer string to cell, preserve formatting

    This seems to work if it helps anyone.
    Attached Files Attached Files

+ 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. Add a row and preserve cell formatting
    By buhaj47 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-25-2018, 09:17 AM
  2. Add character to string and assign font, preserve remainder of formatting
    By Un-Do Re-Do in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-04-2017, 01:39 PM
  3. Replies: 6
    Last Post: 04-05-2016, 03:03 PM
  4. [SOLVED] preserve in-cell formatting when combining two cells
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2015, 02:54 PM
  5. Preserve formatting when pasting part of a cell.
    By Saighead in forum Excel General
    Replies: 4
    Last Post: 06-04-2013, 06:26 AM
  6. [SOLVED] Open a userform from a userform, but preserve the info in the original userform
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2013, 02:38 PM
  7. [SOLVED] Sort does not preserve string of additions
    By HollywoodSam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2006, 11:35 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