A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Cell content must appear as $#.##



 
 
Thread Tools Display Modes
  #1  
Old November 12th, 2007, 12:48 AM posted to microsoft.public.word.tables
MIrving
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  
Old November 12th, 2007, 01:55 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
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  
Old November 12th, 2007, 02:05 AM posted to microsoft.public.word.tables
MIrving
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  
Old November 12th, 2007, 03:50 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
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  
Old November 12th, 2007, 04:05 AM posted to microsoft.public.word.tables
Greg Maxey
external usenet poster
 
Posts: 290
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  
Old November 12th, 2007, 04:17 AM posted to microsoft.public.word.tables
MIrving
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  
Old November 12th, 2007, 09:55 AM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
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  
Old November 12th, 2007, 10:58 AM posted to microsoft.public.word.tables
MIrving
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  
Old November 12th, 2007, 10:53 PM posted to microsoft.public.word.tables
Lene Fredborg
external usenet poster
 
Posts: 1,294
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.









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:06 AM.


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