Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default prefix in text box

would it be posible to default the amount enterd in a text box with the
prefix "R" and "." to seperate sents? we use amounts like R1125.80

and show amounts in lable as that to?

i got this:



Label24.Caption = Range("l65536").End(xlUp).Value
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default prefix in text box

On Jan 19, 9:07 am, pswanie wrote:
would it be posible to default the amount enterd in a text box with the
prefix "R" and "." to seperate sents? we use amounts like R1125.80

and show amounts in lable as that to?

i got this:

Label24.Caption = Range("l65536").End(xlUp).Value


No need for code. You can define a custom format for the cells with
those values. Select the cells then Menu - Format - Cells -
Custom. Then select the "0.00" format and insert the "R" to the left
of the number format. The R will then be prefixed to values that
people add into the worksheet.

If you want to use code, macro capture of the above sequence gives
you:

Range("C7:C10").Select
Selection.NumberFormat = "R0.00"

You can include the NumberFormat line in your subs to give you what
you want.

SteveM
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default prefix in text box

this is what i use now. thinking of using a command button to rather "update"

or what better way is there?

that line does not show label24 in that format

Private Sub MultiPage1_change()
Label13.Caption = Range("f65536").End(xlUp).Value
Label15.Caption = Range("n65536").End(xlUp).Value
Label19.Caption = Range("i65536").End(xlUp).Value
Label24.Caption = Range("l65536").End(xlUp).Value
Selection.NumberFormat = "R0.00"
Label32.Caption = Range("m65536").End(xlUp).Value


End Sub

"SteveM" wrote:

On Jan 19, 9:07 am, pswanie wrote:
would it be posible to default the amount enterd in a text box with the
prefix "R" and "." to seperate sents? we use amounts like R1125.80

and show amounts in lable as that to?

i got this:

Label24.Caption = Range("l65536").End(xlUp).Value


No need for code. You can define a custom format for the cells with
those values. Select the cells then Menu - Format - Cells -
Custom. Then select the "0.00" format and insert the "R" to the left
of the number format. The R will then be prefixed to values that
people add into the worksheet.

If you want to use code, macro capture of the above sequence gives
you:

Range("C7:C10").Select
Selection.NumberFormat = "R0.00"

You can include the NumberFormat line in your subs to give you what
you want.

SteveM

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default prefix in text box

On 19 Jan., 15:41, pswanie wrote:
this is what i use now. thinking of using a command button to rather "update"

or what better way is there?

that line does not show label24 in that format

Private Sub MultiPage1_change()
Label13.Caption = Range("f65536").End(xlUp).Value
Label15.Caption = Range("n65536").End(xlUp).Value
Label19.Caption = Range("i65536").End(xlUp).Value
Label24.Caption = Range("l65536").End(xlUp).Value
Selection.NumberFormat = "R0.00"
Label32.Caption = Range("m65536").End(xlUp).Value

End Sub



"SteveM" wrote:
On Jan 19, 9:07 am, pswanie wrote:
would it be posible to default the amount enterd in a text box with the
prefix "R" and "." to seperate sents? *we use amounts like R1125.80


and show amounts in lable as that to?


i got this:


Label24.Caption = Range("l65536").End(xlUp).Value


No need for code. *You can define a custom format for the cells with
those values. *Select the cells then Menu - Format - Cells -
Custom. *Then select the "0.00" format and insert the "R" to the left
of the number format. *The R will then be prefixed to values that
people add into the worksheet.


If you want to use code, macro capture of the above sequence gives
you:


* * Range("C7:C10").Select
* * Selection.NumberFormat = "R0.00"


You can include the NumberFormat line in your subs to give you what
you want.


SteveM- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Label24.Caption = Format(Range("l65536").End(xlUp).Value, "R0.00")

// Per
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default prefix in text box

thank u

"Per Jessen" wrote:

On 19 Jan., 15:41, pswanie wrote:
this is what i use now. thinking of using a command button to rather "update"

or what better way is there?

that line does not show label24 in that format

Private Sub MultiPage1_change()
Label13.Caption = Range("f65536").End(xlUp).Value
Label15.Caption = Range("n65536").End(xlUp).Value
Label19.Caption = Range("i65536").End(xlUp).Value
Label24.Caption = Range("l65536").End(xlUp).Value
Selection.NumberFormat = "R0.00"
Label32.Caption = Range("m65536").End(xlUp).Value

End Sub



"SteveM" wrote:
On Jan 19, 9:07 am, pswanie wrote:
would it be posible to default the amount enterd in a text box with the
prefix "R" and "." to seperate sents? we use amounts like R1125.80


and show amounts in lable as that to?


i got this:


Label24.Caption = Range("l65536").End(xlUp).Value


No need for code. You can define a custom format for the cells with
those values. Select the cells then Menu - Format - Cells -
Custom. Then select the "0.00" format and insert the "R" to the left
of the number format. The R will then be prefixed to values that
people add into the worksheet.


If you want to use code, macro capture of the above sequence gives
you:


Range("C7:C10").Select
Selection.NumberFormat = "R0.00"


You can include the NumberFormat line in your subs to give you what
you want.


SteveM- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Label24.Caption = Format(Range("l65536").End(xlUp).Value, "R0.00")

// Per



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
how do i add same prefix any text or number to the large datas? how do i add same prefix any text or num Excel Worksheet Functions 2 April 30th 09 12:56 PM
How do I set an 'M' prefix to existing text in a column? muppetlover27 New Users to Excel 2 June 10th 08 01:41 PM
How do I separate the alpha prefix from a text (abc123 or a1234)? kskaug1 Excel Worksheet Functions 1 June 28th 06 05:23 PM
How to create a prefix containing text and zero? GeneWan Excel Worksheet Functions 10 November 24th 05 03:03 AM
How can I add a two letter prefix to text in cells? Newbs18 Excel Discussion (Misc queries) 2 November 9th 05 04:06 AM


All times are GMT +1. The time now is 03:44 PM.

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

About Us

"It's about Microsoft Excel"