how do i format a textbox on a userform created in excel

I created a userform to accept information from the user.
My problem is ,eg  i would like the TxtAmount.value to display the amount in 
Currency when i enter the number. The same for the percentage control.

I am new to this.
Bert1 (39)
5/5/2008 3:59:00 PM
excel.newusers 15348 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 49


Text boxes accept text only, so you need to convert the value to the 
formatted text that you want.

Something like:

UserForm1.TextBox1.Text = Format(Range("A1").Value, "$#,##0.00")

Same idea for percentages"

UserForm1.TextBox1.Text = Format(Range("A1").Value, "0.00%")

MS Excel MVP

"Bert" <> wrote in message
>I created a userform to accept information from the user.
> My problem is ,eg  i would like the TxtAmount.value to display the amount 
> in
> Currency when i enter the number. The same for the percentage control.
> I am new to this. 

5/5/2008 10:46:16 PM

Similar Artilces:

Even though a floating toolbar is created well, all its toolbuttons remain disabled
Hi I am working on a MFC MDI application. Environment is VS2005. I have derived a class from CToolBar and able to create and load it successfully. The toolbar is NOT created in CMainFrame::OnCreate(). Instead it is created on a tab-switch event. The tab-switch event handling is computationally higher and it takes around 2~3 seconds to complete. The toolbar is visible and enabled properly for sometime. However, at the end of the processing all the tool buttons are disabled. (The toolbar it self is ok and I can drag it). I checked to code and there is nothing in the code which explicitly dis...

Shared excel file dissapears
We use a shared excel 2000 xls file shared on a w2k server as a production log. we now have about 30 users with about 12 users constantly editing. As we add more users the dissapearances seem to mount up. we are at about 2 a day now. I was wondering what the max amount vs the recommended amount of simultaneous users are. Are there any known issues which would cause excel to mysteriously vanish?? thanks cr -- It has been said that democracy is the worst form of government except all the others that have been tried. - Winston Churchill ...

Excel icon changed to classic
Version: v.X Operating System: Mac OS X 10.4 (Tiger) Processor: Intel I connected to another user to borrow their Excel application. Done this many times with no problem. For some the reason, the icon changed showing a circle with a slash. And now the icon is indicated as a classic application even though all the other Office icons (Powerpoint, Entourage, Word) are still showing up as OSX. If I try to connect to same user from different mac, the icon shows up fine as OSX. ...

Copy Excel email addresses to GroupWise
I have an Excel worksheet that has a column that contains email addresses. I would like to copy some of the email addresses into GroupWise. When I select certain email addresses and copy and paste them into GroupWise. For some reason I get the email addresses in between the emails that I have selected. Examples: If I selected,, and and pasted into GroupWise, I would receive all of the addressesin the TO: f...

How can I plot Excel data on a geographical map or chart?
I have data by city, state, and zip code. How can I plot this data by geography on a map of the United States of America or on a map of a state. Some version of XL had that some rudimentary capability in that area. However, MS stripped it out and together with other goodies created a separately priced product called, I believe, MS MapPoint. -- Regards, Tushar Mehta Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <>, says... &g...

Print a 2-sided document in Excel for a 3-ring binder?
How do I print a 2-sided document in Excel for a 3-ring binder? I have tried everything I can think of, but the margins on the backside are identical to the margins on the front and that doesn't work. The right margin on the back needs to be like the left margin on the front in order to punch holes in the document. Any help you can give would be great! I cannot be the only one who needs to know how to do this. Thank you! You would normally set that option on the printer functions, File>Print>click Properties next to printer name. "Mayableu" wrote: &...

2007 Excel Workbook multiple worksheets I want 1 chart
I have Blood Pressure Monitoring series. where A = Day of Week Month Year as Wednesday Apr 1-09-9:30am this is a text value not a date as Excel always fouls up the time. Days of the month are 1 - 31 or 1 - 30 or 1-28/29 B= Diastolic Pressure as Number no decimal places C= Systolic Pressure as Number no decimal places D= Pulse rate as number no decimal places I can create a chart for each month. With each month or single for each month on separate sheet. Each month is formated and arranged the same. How do I set the chart data range for all months or any multiple of months 14, 2, 3 o...

Different Booklet Format
Using Windows XP and Office 2007 Trying to print a booklet that is on a portrait orientation 8 1/2 by 11 sheet of paper that is folded in half from top to bottom. The resulting booklet would open from the bottom rather than from the left like a normal booklet. It would be like a greeting card that has a top and a bottom on the inside rather than a left and a right. Hope I'm explaining this correctly. Anyhow, cannot seem to get a page set up that works correctly. Any suggestions??? BK wrote: > Trying to print a booklet that is on a portrait orientation 8 1/2 by 11 > ...

Formatting Problem
I've created a blank booklet of x no. of pages with page size of h7.25" x w4.75" with 0.5" margins all around. I've been provided with material on floppies to incorporate into the booklet. The material is in the wrong font type and size and needs considerable change in other formatting. This I've done by opening the document into a WORD document of the same dimensions as stated above and tailoring the content to this WORD document. There are some centering, indents, right or left alignment. When I then try to insert this into the booklet in Publisher, s...

delimited file format issue
i get reports from (idx) a program that are delimited files. the columns are all fine but 1 and i can't figure it out. its supposed to be money and comes across as 11500. in the original program (idx) it would look like 115.00 and that is how i want it to look in excel. i tried the easy stuff like formatting and i keep getting 11500.00 or 1150.0 in my simple mind i thought it would be easy to move that decimal but its not turning out that way. i have thousands of line items so doing it one by one is not the optimum solution. any help is appreciated. excel 2003 os XP You really wa...

axis font excel chart?
how can I change the font of the scale in an excel chart? Right-click on the relevant axis. Format Axis/ Font/ Size: -- David Biddulph "ColinB" <> wrote in message > how can I change the font of the scale in an excel chart? ...

Interactions - Export to Excel
Folks: Need your help ! I am trying to pull an acitivty report in CRM. If I go to the Interactions page, and then click on “edit View” icon over on the right hand side, and complete the drop downs, if I export to Excel, I get an error message that reads: Argument ‘Index’ is not a valid value. I get this error only for Interactions and not with any other workplace. We are on CRM 3.0 .- SQL Server 2005 Thanks ! ...

Creating a graph with 3 lines
Hello, hope you can help. I am trying to do a break-even analysis in the form of a graph. I am extreamly stuck on what to do Ive searched help and it gives me the option of downloading a wrksheet to input all the details but that is not what i am wanting. I just want to enter the details in excel as I already know the amounts and then to be presented with a simple graph with 3 entries. What do I search under to help me input 3 sources of information in like the fixed costs, selling costs and variable costs? Im realy stuck!!! Gillian7117 wrote: > Hello, hope you can help. > I am try...

Including Images in Excel Report Builder
We have a client that is attaching jpgs to the item maintenance window in GP and they want an Excel Report Builder report of each inventory item along with its image. It seems that the file name is stored in hex format. Is it possible to include a reference to the image location in an Excel Report Builder report, so the report can include the image inside of Excel? Thanks ...

System Environment: W2003 Server SQL 2000 CRM and SQL on different servers Two errors: Duration and Subject. Have searched here and in the CRM KB (Customer Source) . We exhausted our included Software Assurance Support Cases resolving issues that were not fixed by the hotfix fix. In the user's own words: Outlook 2003 SP2 CRM Laptop Client (3.0.053) Goal: Create a Task within Outlook, Save, and Close the task within Outlook. Process: 1 - Open Outlook and click the Create New Task icon in the CRM Toolbar. 2 - Click the Regarding button and select the Case I want to associate the Tas...

Open Excel workbook maximized from Access
I found the code Application.FollowHyperlink in the newsgroups, which works well to open the workbook from a button on an Access form. But I want the worksheet to open maximized, rather than "floating" in the Excel window. What can I add to my code to do this? It reads: Application.FollowHyperlink "path/nameof workbook.xls" Or do I need to do this another way? Can I do something in the workbook? (Not too familiar with Excel.) Thanks for your help. -- susan ...

Need to create a VB script for Microsoft Outlook
Hi Folks, I am a newbie to VB scripting. I have this problem I need to solve in outlook. Often we have seen when people reply to emails, they say "please see my comments inline marked BlahBlah". Whenever people do such inline commenting, I would like the script to copy that info to the top of that email, along with a "link" to that embedded line. When the user click that line, the cursor show point the actual place where that comment was made. Pls let me know how can I implement in a VB script.. When the user right clicks the mouse at the end of of his embedde...

excel locks up after selecting a cell #2
excel locks up after selecting a cell. When ever, I select a Cell, that will automatically selects all the cell and this freezes the entire computer. Can any body who would help me resolve this issue? Please help.... ...

Where has the data map tool gone to in Excel 2003?
Cannot find it in 2003. Was there in earlier versions of Excel. It's gone as of Exel 2002. Here is MS's statement and a link to another program for map making. tj "macray" wrote: > Cannot find it in 2003. Was there in earlier versions of Excel. If it still resides on the hard drive, you can use it from later Excel versions, through the Insert Object dialog. But I think uninstallation is pretty good at wiping it out. In my case, I have multiple versions of Excel installed on one machine, so Excel 2003...

How Do I create a Timing Tool
All, I wonder if I can call on your expert advice. I am looking to create a Timing Tool within Excel which will be able t capture timings of specific user defined areas. For Example looking to time specific sections of say for a telephon call and the interaction the agent has with the Computer System..ho long specific actions take...and then from that be able to submit th data into a sheet..and move on to another one. This is so that summary data can be captured and analysed. All help appreciated. Regards Tim Hardin -- Message posted from Tim, It depends upo...

Stop excel from reporting replacements
How do I get excel from popping up the window that tells how many entries its replaced when I do a Ctrl-H. I have to edit a lot of entries and this is something I didn't have to put up with in Office 97 I'm not sure you can stop it (I couldn't). But if your fingers are on the keyboard, hit the enter key to dismiss it. (Or try hitting the enter key twice really quickly (with replace all having focus). It might not be noticeable (much). Chris wrote: > > How do I get excel from popping up the window that tells how many entries its > replaced when I do a Ctrl-H. I ha...

Changing of Cell protections after saving Excel File (2002)
This problem occurs when I protect a document using a macro 4.0 function: =PROTECT.DOCUMENT(TRUE,,,TRUE,TRUE). When I use the function within a macro4.0 macro, on an original file, everything works fine. The sheet has unlocked cells, and when the sheet is protected, it allows me to access those cells. But if I save the file, or another name, then the fun begins. The enable selection of the sheet( view codes) has gone from 0-xlNoRestrictions to -4142- xlNoSelection. This locks me out of doing anything in the sheet. When I unprotect and then re-protect the sheet using the T...

How Do I Stop Tile Format in Print Preview
Every document I do in Publisher 2007 is being tiled and I want it to be just the single page in the size I have chosen (11" x 17"). Anyone have a suggestion on how I can correct this and have only one page print out instead of the four tiled pages? Thank you! In page setup select the 11 x 17 paper size. It will appear correctly on the screen. Do your creating. When you are ready to print, File, print, re-set the page size to 11 x 17 on this screen, the tile feature should disappear, click the print preview, it should preview and print correctly. If you cancel out of this s...

Inserting comment depending on the Conditional formatting
Hi Is it possible to insert comment depending on the conditiona formatting.I mean if the color of the cell is blue the comment shown i " A " & if the color of the cell is green the comment shown is " B " similarly if the color of the cell is black the comment shown is " C . ( The color names which i had writted here r examples i dont know th real names of the colors which i have given in my spreadsheet) -- Little Maste ----------------------------------------------------------------------- Little Master's Profile:

Do a calculation in cells with text data format
I have a few columns of cells having a mixed data format of number and text. Is it possible to convert the first row of numbers in text data format for further calculation? Your guidance to accomplish it is appreciated. Thanks, Ray Example? -- Regards, Peo Sjoblom "Ray" <> wrote in message news:ei$Jbmy$FHA.216@TK2MSFTNGP15.phx.gbl... > I have a few columns of cells having a mixed data format of number and text. > Is it possible to convert the first row of numbers in text data format for > further calculation? Your guidance to accomplis...