+ Reply to Thread
Results 1 to 6 of 6

User Form Textbox Formatted as Currency

  1. #1
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    User Form Textbox Formatted as Currency

    Hello all!

    I have a user form (Add New Inventory Item on 'Switchboard') with a textbox in question. I want the textbox to display as currency which enters that value on the Inventory worksheet column G. The problem I am having is when I total the column (shown on cell G15 'Switchboard') there is no value and the cells show stored as text and not a number. I have the following code for that textbox and would like it to be entered as a number and displayed as currency so the sum function will work:

    Please Login or Register  to view this content.
    Does anyone know how this can be fixed?

    Thank you for any help or suggestions
    Attached Files Attached Files

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: User Form Textbox Formatted as Currency

    You must add .Value at the end of
    Please Login or Register  to view this content.
    so it becomes
    Please Login or Register  to view this content.
    This will tell excel to enter it in the cell as a numeric value instead of text.
    Do this with all the lines that require a number to be placed in the cell.
    You can add .Text to the ones that require text to be placed in a cell.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Re: User Form Textbox Formatted as Currency

    Works perfectly thank you very much. I have just one more question referring to the serial number column. It has error saying it is a text field is really what I want because serial numbers aren't in need of calculations. Should I just ignore the error or is there a way to fix?

    Thanks
    Last edited by billgyrotech; 01-05-2017 at 02:12 PM.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: User Form Textbox Formatted as Currency

    You can do the same thing with that line of code as well, add the .Value to the end. Even if the Model/Serial numbers are alpha numeric, it will place them in the cell correctly and you wont get the error any more.

  5. #5
    Banned User!
    Join Date
    03-06-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    295

    Re: User Form Textbox Formatted as Currency

    Excellent thanks a bunch and Happy New Year!

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: User Form Textbox Formatted as Currency

    You're welcome. Thank you, same to you.

+ 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] Easy One - Convert user text in UserForm TextBox to Currency
    By DonJuan85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2015, 01:42 PM
  2. Easy One - Convert user text in UserForm TextBox to Currency
    By DonJuan85 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2015, 07:00 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. Access an pre formatted excel through user form
    By taylor.m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2011, 06:29 PM
  5. [SOLVED] textbox on user form
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2005, 12:45 PM
  6. [SOLVED] User Form in VB = TextBox
    By Kel in forum Excel General
    Replies: 1
    Last Post: 08-10-2005, 08:05 PM
  7. Currency format for combo box in a user form
    By Jennifer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2005, 02:06 AM

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