Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Problem getting the content of a table cell using ole object in powerbuilder | Microsoft Word Help | |||
How can I see the real content of the table of content in Word? | Microsoft Word Help | |||
is there a way to repeat content of cell from last row from previous page? | Tables | |||
How do I keep the cell content format when I merge data? | Mailmerge | |||
Protecting cell table content | Tables |