Results 1 to 9 of 9

Use spreadsheet cell format to set userform text box format - how?

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Use spreadsheet cell format to set userform text box format - how?

    Hi Everyone
    I have tried searching the forum but can't quite find a solution to my problem.

    In the spreadsheet I have cells that hold values which represent 'targets'.
    These can all be different and can change from time to time i.e. number, percent, string etc. depending on whether they are quantitative or qualitative targets.
    The format of these are set to suit at setup or when the targets change - no problem

    I can display the contents of these cells in a VBA userform using text boxes OK.

    I need a way of detecting the cell number format in the spreadsheet to automatically set the format of the text box in the userform so that the values display correctly in the userform.

    I don't want to 'hard code' the text box formats each time the target type change - there can up to 70 of them!

    I have read up on the FORMAT function but it seems you need to know the format required first in order to use it.

    Any help gratefully received?

    WTIA

    barry
    Last edited by barryleajo; 08-20-2010 at 08:31 AM.

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