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  

Currency sign and formulas



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2004, 12:41 PM
Marco
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Hello all,

I use a table in a document to create an invoice.
When I fill in ammount (A2) and price (B2) the formula gives te total (C2, with fielcodes for notation/format).
But I want the currency sign automaticaly placed before the price (B2) I give in.

How can I change the format of a cell (with no formula in it), so when I type in for example 12, the value of the cell is $ 12,00.

Any suggestions?

Thanks in advance.
  #2  
Old May 6th, 2004, 12:56 PM
Graham Mayor
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Probably the simplest plan would be to make this invoice into a form and use
form fields for the variable data - you can format the appropriate fields
as numbers with currency masks. The calculations you can do outside the form
fields using an = field with a currency mask. Make sure that you set the
last form field's properties to calculate on exit so that the calculation
will be updated.

--

Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word




Marco wrote:
Hello all,

I use a table in a document to create an invoice.
When I fill in ammount (A2) and price (B2) the formula gives te total
(C2, with fielcodes for notation/format).
But I want the currency sign automaticaly placed before the price
(B2) I give in.

How can I change the format of a cell (with no formula in it), so
when I type in for example 12, the value of the cell is $ 12,00.

Any suggestions?

Thanks in advance.



  #3  
Old May 6th, 2004, 01:21 PM
Marco
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Hi Graham,

First of all, thanks for your reply.

If have two small questions:
* Can you tell me how to format the fields as you mentioned? How do I make from a cell a form field?

* How can I set the last form field's properties to calculate on exit?

Thanks in advance,
Marco.
  #4  
Old May 6th, 2004, 01:55 PM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

See:

Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Marco" wrote in message
...
Hi Graham,

First of all, thanks for your reply.

If have two small questions:
* Can you tell me how to format the fields as you mentioned? How do I make

from a cell a form field?

* How can I set the last form field's properties to calculate on exit?

Thanks in advance,
Marco.


  #5  
Old May 6th, 2004, 01:58 PM
macropod
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Hi Marco,

You need to add a currency picture switch to your calculation field, like:
\# $,0.00
To do this, select the field and press Shift-F9, then add the switch to the
end of the field and press F9 again to update the result.

Cheers


"Marco" wrote in message
...
Hi Graham,

First of all, thanks for your reply.

If have two small questions:
* Can you tell me how to format the fields as you mentioned? How do I make

from a cell a form field?

* How can I set the last form field's properties to calculate on exit?

Thanks in advance,
Marco.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 3/05/2004


  #6  
Old May 6th, 2004, 02:03 PM
Greg
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Marco,

Here is a scad of information on creating Word forms. See
the linked articles by Dian Chapman.

http://word.mvps.org/faqs/tblsfldsfms/LinesInForms.htm

Basically you just need to display the forms tool bar,
with the toolbar insert a form field in cell A2 and B2.
Double click each formfield and apply the currency masks
and check calculate on exit.




-----Original Message-----
Hi Graham,

First of all, thanks for your reply.

If have two small questions:
* Can you tell me how to format the fields as you

mentioned? How do I make from a cell a form field?

* How can I set the last form field's properties to

calculate on exit?

Thanks in advance,
Marco.
.

  #7  
Old May 6th, 2004, 02:41 PM
Marco
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

First of all thanks all for the reply.

I'm almost there... I created the form with the pre-defined fields. I also use the option calculate on exit.
But before I enter my information in the table, a macro is entering information in the top of the document. But when I secure the form already in the .DOT file the macro gives an error because of the protected form. Is there an option to add a vba line after everything is filled in, to protect the form?

So my last lines a

Unload frmInvoiceDataEntry
ActiveDocument.Save
End Sub

But before the End Sub I would like to protect the form so the user can only fill in those fields I defined in the form.

Thanks again everybody!
Marco.

  #8  
Old May 6th, 2004, 03:56 PM
Greg
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Marco,

Try before the ActiveDocument.Save:

On Error GoTo Ignore
ActiveDocument.Protect Type:=wdAllowOnlyFormFields,
NoReset:=True
MsgBox "The form is now protected."
Igno Err.Clear

You might need to put a ActiveDocument.Unprotect line in
somewhere in your code.

HTH


-----Original Message-----
First of all thanks all for the reply.

I'm almost there... I created the form with the pre-

defined fields. I also use the option calculate on exit.
But before I enter my information in the table, a macro

is entering information in the top of the document. But
when I secure the form already in the .DOT file the macro
gives an error because of the protected form. Is there an
option to add a vba line after everything is filled in, to
protect the form?

So my last lines a

Unload frmInvoiceDataEntry
ActiveDocument.Save
End Sub

But before the End Sub I would like to protect the form

so the user can only fill in those fields I defined in the
form.

Thanks again everybody!
Marco.

.

  #9  
Old May 6th, 2004, 04:00 PM
Graham Mayor
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Not having see the rest of your macro, can I suggest that you run all the
autonew macro code on an unlocked form template to insert whatever it was
you were inserting at the top of the document then add the line

ActiveDocument.Protect Type:=wdAllowOnlyFormFields

To lock the form and provide access to only the fields. The above has the
effect of clicking the padlock icon on the forms toolbar.

Given that you have thrown in this extra requirement into the pot, I might
have been tempted to suggest that you employ a userform to gather all your
data run your bit of code and enter the data and calculations in the
required parts of the document. This is a bit more elegant than an on-line
form. There is loads of information about userforms on the MVPS web site -
see link in sig block.

--

Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word




Marco wrote:
First of all thanks all for the reply.

I'm almost there... I created the form with the pre-defined fields. I
also use the option calculate on exit.
But before I enter my information in the table, a macro is entering
information in the top of the document. But when I secure the form
already in the .DOT file the macro gives an error because of the
protected form. Is there an option to add a vba line after everything
is filled in, to protect the form?

So my last lines a

Unload frmInvoiceDataEntry
ActiveDocument.Save
End Sub

But before the End Sub I would like to protect the form so the user
can only fill in those fields I defined in the form.

Thanks again everybody!
Marco.



  #10  
Old May 7th, 2004, 07:46 AM
Marco
external usenet poster
 
Posts: n/a
Default Currency sign and formulas

Thank you very much, all of you!

With your help I solved my problem.

Thanks again!
Marco.
 




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 01:59 PM.


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