Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
MIrving MIrving is offline
external usenet poster
 
Posts: 15
Default Cell content must appear as $#.##

In Word 97, is it possible to set up cells in a table so that the value in a
cell automatically appears as $#.##, irrespective of how a user enters the
amount? Thanks.
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Cell content must appear as $#.##

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the value in
a
cell automatically appears as $#.##, irrespective of how a user enters the
amount? Thanks.



  #3   Report Post  
Posted to microsoft.public.word.tables
MIrving MIrving is offline
external usenet poster
 
Posts: 15
Default Cell content must appear as $#.##

Thank you for answering it. As an alternative, is it possible to either:

1. In a VB userform, force a textbox entry (ie. whatever the user inputs)
to always be displayed as $#.##, irrespective of how the number is entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the value in
a
cell automatically appears as $#.##, irrespective of how a user enters the
amount? Thanks.




  #4   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Cell content must appear as $#.##

Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is actually
a String, that is how it will be inserted into the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to either:

1. In a VB userform, force a textbox entry (ie. whatever the user inputs)
to always be displayed as $#.##, irrespective of how the number is entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then
make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the value
in
a
cell automatically appears as $#.##, irrespective of how a user enters
the
amount? Thanks.






  #5   Report Post  
Posted to microsoft.public.word.tables
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 285
Default Cell content must appear as $#.##

MIrving,

For what it is worth (and probably not much):
http://gregmaxey.mvps.org/Currency_Format.htm

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Doug Robbins - Word MVP wrote:
Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is
actually a String, that is how it will be inserted into the document.


"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to
either: 1. In a VB userform, force a textbox entry (ie. whatever the
user
inputs) to always be displayed as $#.##, irrespective of how the
number is entered into the textbox; or

2. On clicking of the commandbutton in a userform, force the
insertion of the text from each textbox into the Word document
bookmark to always be displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an
Excel Spreadsheet, which, except when the user is actually working
in the spreadsheet, will be indistinguisable from a Word table. You can
then make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the
value in
a
cell automatically appears as $#.##, irrespective of how a user
enters the
amount? Thanks.





  #6   Report Post  
Posted to microsoft.public.word.tables
MIrving MIrving is offline
external usenet poster
 
Posts: 15
Default Cell content must appear as $#.##

Thank you, that's great. A really basic question I'm sure, but where do I
put txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")? Thanks
again.

"Doug Robbins - Word MVP" wrote:

Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is actually
a String, that is how it will be inserted into the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to either:

1. In a VB userform, force a textbox entry (ie. whatever the user inputs)
to always be displayed as $#.##, irrespective of how the number is entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then
make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the value
in
a
cell automatically appears as $#.##, irrespective of how a user enters
the
amount? Thanks.






  #7   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Cell content must appear as $#.##

In the Exit event of the textbox.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you, that's great. A really basic question I'm sure, but where do I
put txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")?
Thanks
again.

"Doug Robbins - Word MVP" wrote:

Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is
actually
a String, that is how it will be inserted into the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to
either:

1. In a VB userform, force a textbox entry (ie. whatever the user
inputs)
to always be displayed as $#.##, irrespective of how the number is
entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion
of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then
make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the
value
in
a
cell automatically appears as $#.##, irrespective of how a user
enters
the
amount? Thanks.








  #8   Report Post  
Posted to microsoft.public.word.tables
MIrving MIrving is offline
external usenet poster
 
Posts: 15
Default Cell content must appear as $#.##

Thank you. When I run it, I get an error 424 "object required":

Private Sub Price_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")
End Sub

Where have a gone wrong? Thank you for your help.

"Doug Robbins - Word MVP" wrote:

In the Exit event of the textbox.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you, that's great. A really basic question I'm sure, but where do I
put txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")?
Thanks
again.

"Doug Robbins - Word MVP" wrote:

Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is
actually
a String, that is how it will be inserted into the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to
either:

1. In a VB userform, force a textbox entry (ie. whatever the user
inputs)
to always be displayed as $#.##, irrespective of how the number is
entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion
of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then
make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the
value
in
a
cell automatically appears as $#.##, irrespective of how a user
enters
the
amount? Thanks.









  #9   Report Post  
Posted to microsoft.public.word.tables
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
Default Cell content must appear as $#.##

If the name of your TextBox is "Price", you must refer to that name in your
code. Instead of:

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

use

Price.Text = Format(Price.Text, "$#,###,00")

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"MIrving" wrote:

Thank you. When I run it, I get an error 424 "object required":

Private Sub Price_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")
End Sub

Where have a gone wrong? Thank you for your help.

"Doug Robbins - Word MVP" wrote:

In the Exit event of the textbox.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you, that's great. A really basic question I'm sure, but where do I
put txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")?
Thanks
again.

"Doug Robbins - Word MVP" wrote:

Yes, that is certainly possible by the use of the Format() function

On exit from a textbox (TxtBoxCurrency)

txtBoxCurrency.Text = Format(txtBoxCurrency.Text, "$#,###,00")

Once you have the data formatted that way in the text box, as it is
actually
a String, that is how it will be inserted into the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
Thank you for answering it. As an alternative, is it possible to
either:

1. In a VB userform, force a textbox entry (ie. whatever the user
inputs)
to always be displayed as $#.##, irrespective of how the number is
entered
into the textbox; or

2. On clicking of the commandbutton in a userform, force the insertion
of
the text from each textbox into the Word document bookmark to always be
displayed as $#.##.

Thank you for any suggestions.


"Doug Robbins - Word MVP" wrote:

It is not possible with a Word table. You can however insert an Excel
Spreadsheet, which, except when the user is actually working in the
spreadsheet, will be indistinguisable from a Word table. You can then
make
use of the cell formatting abilities of Excel.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MIrving" wrote in message
...
In Word 97, is it possible to set up cells in a table so that the
value
in
a
cell automatically appears as $#.##, irrespective of how a user
enters
the
amount? Thanks.









Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem getting the content of a table cell using ole object in powerbuilder sergio Microsoft Word Help 2 April 19th 07 04:55 PM
How can I see the real content of the table of content in Word? Elly Driesen-Schepens Microsoft Word Help 3 March 28th 07 12:58 PM
is there a way to repeat content of cell from last row from previous page? ip Tables 3 September 6th 06 05:03 PM
How do I keep the cell content format when I merge data? Melissa Mailmerge 1 September 17th 05 06:19 AM
Protecting cell table content Lauro Tables 1 June 21st 05 08:00 PM


All times are GMT +1. The time now is 12:58 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"