PDA

View Full Version : Stumped Excel/Word-post do..loop results from excel to word



2ManyTimes
11-09-2007, 05:06 PM
I am trying to use a do..loop structure to loop through the entries of an array compiled from worksheet "Cost Detail" and then post the results by work craft to daily reports created from a template in Word. Problems: 1) the results posted for each work craft aren't accurate; 2) not sure how to get the totals for the day posted in the row "Daily Total" on the Word document. The worksheet "Sheet2" contains the array values to be posted to the daily reports in Word.
Coders, please contact me via private message or email. Thanks.

xld
11-09-2007, 06:50 PM
What does not accurate mean? Give us an example of something that is wrong and what it shoud be.

What is Sheet2 for, and what are those values?

2ManyTimes
11-09-2007, 07:35 PM
What does not accurate mean? Give us an example of something that is wrong and what it shoud be.

What is Sheet2 for, and what are those values?

My code runs when someone clicks on the command button on the "Cost Detail" worksheet. The code summarizes # of employees and hours for each work craft for each day and stores the data in the array arrDailyReport. I use Sheet2 only to print out the values of the array to make sure that my code is summarizing the data correctly. It is only temporary. The array appears to work fine right now.

The problem occurs when the code runs the module RecordDailyReport. The intention is to create a new Word document based on the template DailyReportTemplate.dot for each day worked. This is the "Daily Report". Each time the work date in the array changes, a new document should be created and the number of employees and hours should be recorded on the daily report for each work craft.

The second problem I referred to in my post was the need to record daily totals in the "Daily Totals" row of each Word document with the total number of employees and hours for the day. The code in module RecordDailyReport accumulates time but I can't figure out how to display it on the Word document.

As you can probably figure from my project, our company is in the contruction industry. I will likely need ongoing help with the project.

Thanks for your help.

2ManyTimes
11-12-2007, 06:02 PM
I still have problems with my code. I want to solve this problem but am need of some solutions and short on time. Can I get a quote for solving this? What do I need to do get a quote?