title: VBA creating a Userform single cell object
body: <p>I've developed an application that uses excel/ VBA to interface a MySQL database in a WAMP configuration. One of the features of this application is the automatic saving of cells values, including the colors of words, font style, font size etc. The application loads up a calendar and renders the entered cell text upon workbook open.</p>
  
  <p>This is achieved through breaking down the cell value into characters and storing them into a cell_value table that references other objects within my database in the following manor</p>
  
  <pre><code>+----+-------------+------------+------------+----------------------+--------------------+
  | id | employee_id | project_id |    date    |      cell_value      |     font_color     |
  +----+-------------+------------+------------+----------------------+--------------------+
  |  1 |           1 |          1 | 2015-01-07 | the weather is crazy | 1:14:70,15:20:2000 |
  +----+-------------+------------+------------+----------------------+--------------------+
  </code></pre>
  
  <p>this table stores the text entered by person with id=1 for project with id=1 on '2015-01-07'. The cell value is 'the weather is crazy'. the font color is listed in a comma delimited string with each element of this string delimited by a colon.</p>
  
  <pre><code>+--------------------------+------------------------+------------+
  | starting_character_index | ending_character_index | font_color |
  +--------------------------+------------------------+------------+
  |                        1 |                     14 |         70 |
  |                       15 |                     20 |       2000 |
  +--------------------------+------------------------+------------+
  </code></pre>
  
  <p>I have been using the cell_selection_change event to trigger an automatic write to the database to store the contents of a global called LAST_SELECTED_CELL (as the active cell is set prior to the user making changes to it and hence does not cater for writing to the database AFTER the user makes changes to the contents of the cell).</p>
  
  <p>this method works although is prone to bugs and for large amounts of cells and complex cell font/ color configurations is slow.</p>
  
  <p>I was looking into using a spreadsheet embedded into a userform as potentially a better way of doing a similar process however i've found it to be quite buggy and prone to crashing. Is there a tool out there that allows you to embed a single excel 'cell' into the userform instead of an entire workbook?</p>
  
  <p>If not, is there anything else that could be modified to suit my needs? Or do you have any suggestions as to how to improve my current method of storing/ rendering the data</p>
  
  <p>Kind regards
  Jordan</p>