Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default User Form Text Box

How can I create a text box that will return a single?

I have user form that has two labels and one text box. Label One shows the
base rate. Text Box allows the user input a markup. Label Two should show the
total rate, consisting of the markup and the base rate.

I programmed a label.caption update at the text box change event, but I get
a data mismatch because the text box returns text even if the input is
numeric.

Also, how can I configure the text box so that all values input show as
percentages, similar to the % format on a normal worksheet cell?

Thanks,

Paul

--
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default User Form Text Box

Paul,

Regarding the data mismatch:
Need to use function like CSng to convert the textbox string to a
single data type.
sMarkup = CSng(UserForm.TextBox.Value)

You may also want to validate what the user enters, with IsNumeric
function.

Not sure about the format question.

George

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default User Form Text Box

How can I create a text box that will return a single? <<<<

You may need to contact a dating service for this. ;-)



"Paul" wrote:

How can I create a text box that will return a single?

I have user form that has two labels and one text box. Label One shows the
base rate. Text Box allows the user input a markup. Label Two should show the
total rate, consisting of the markup and the base rate.

I programmed a label.caption update at the text box change event, but I get
a data mismatch because the text box returns text even if the input is
numeric.

Also, how can I configure the text box so that all values input show as
percentages, similar to the % format on a normal worksheet cell?

Thanks,

Paul

--
Paul

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight/Select text in User Form? Alan Smith Excel Discussion (Misc queries) 2 September 13th 07 09:02 PM
Adding a new text box to user form Marilyn Excel Discussion (Misc queries) 3 May 13th 07 11:42 PM
User Form: Cannot Update Text Box Charles in Iraq Excel Discussion (Misc queries) 0 October 12th 06 07:53 AM
Adding text file to a user form? Chip[_3_] Excel Programming 12 July 29th 05 08:18 AM
Clear Contents Of A Text Box In User Form Graham[_5_] Excel Programming 1 April 22nd 04 09:09 AM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"