Rethink in design of document / vba coding help please

N

Nick Calladine

I have produced a document for a friend which has a table for data and a
table for totals

My document basically is all done as word and using the vba to do
caculations and check data in the table for integrity.

This has worked fine for the last year but now he needs another controlling
element... and I am not sure if you be thinking of writing the input section
in to a form rather than directly to the table.

I basically now need to add a combo box to each row of the table all the
combo box will be doing is offer choices of calculating the data
ie dropdown1 = vat thus add vat to the totla
dropdown2 = cis4 add vat to the gross wage and then -18% of the gross
wage and add together
dropdown3 = cis6 -18% off the gross wage

but i thought if i can get this right if there is further type of deduction
/ calculation required it just gets added on part off the dropdown

so firstly is there a better way should i be using a form to input data and
then put it to the table.

Is it ok to have a table which has a column of the same repeated dropdown in
each row.... how can i achieve this.. .as i have not embarked in repeating a
single dropdown on the same page before

Another point to remember is the document core data doesnt change all that
often
ie a man joins the company every week he will get paid thus his deduction
details will be the same everyweek after being created ; also his name wont
change ; his job number wont change

Please advise how i should be looking at the project now as i think i might
a bit more of application rather than document manuliation.

All advise is welcome and if people have any examples of similar things so i
can see how visualy they have intergrated them that would be a great help...

Many Thanks
 
C

Chuck Henrich

Here's one approach for creating a pop-up list in a field (from the mvps site):
http://word.mvps.org/faqs/tblsfldsfms/AutoTextList.htm
You could then use the contents of that cell in your calculation macros.

However a bigger question is whether you should migrate this work to Excel
and let Excel do the calculations for you? Seems like an awful lot of work
to replicate spreadsheet functionality in a Word table.

IMHO Word tables are fine for text but not so fine for calculation...
 
N

Nick Calladine

Thanks for the input

To be honest most of it of this stuff is text based and very specific to
rules.. just want to control the way the user works..
the main document has worked very well for the guy.. and he uses every week
but i think from looking it seems to be the fine line of using a form and
saving the data rather than dynamically alltering it ..

is there a way to insert something like a drop down in a table cell through
word.. been surfing all day and could see any easy way...

i can send you the original document ... if you like.. so u can see the type
of thing that i have done so far...

thank once again
 
C

Chuck Henrich

is there a way to insert something like a drop down in a table cell through
word.. been surfing all day and could see any easy way...

Did you look at the link I included in my previous post? It shows how you
create a field with mutiple choices which is what it sounds like you're
looking for.
 
D

David Sisson

This has worked fine for the last year but now he needs another controlling
element... and I am not sure if you be thinking of writing the input section
in to a form rather than directly to the table.

Not necessarily, if manual input has worked before, and he is used to
that, stick with it.
I basically now need to add a combo box to each row of the table all the
combo box will be doing is offer choices of calculating the data

Will this be printed out? If so, does it matter if the combo box
shows. If it does, then you'll have to work around that.
ie dropdown1 = vat thus add vat to the totla
dropdown2 = cis4 add vat to the gross wage and then -18% of the gross
wage and add together
dropdown3 = cis6 -18% off the gross wage

Again you don't say if it's necessary to print the totals out. If the
totals will be read off the screen, then a userform would seem to be a
better approach. You could even calculate the totals using a userform
and create a new doc with all the info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top