如何修改代码以包含持续时间? [英] How to modify code to include a duration?
本文介绍了如何修改代码以包含持续时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何修改以下代码以包含持续时间列或命名范围?
我想修改它,以便持续时间为三到五天的任务在一周的相应日期在日历中显示相同的任务。 br />
我相信要修改的区域在250和282之间...
有人可以指出要做的所需更改
感谢您提供的任何帮助
How can the following code to be modified to include a duration Column or "Named Range"?
I would like to modify it so that a task that has a duration for example, three to five days would show the same task in the calendar on the corresponding days of the week .
I believe the area to be modified is between line 250 and 282...
Could someone point out the required changes to be made
Thanks for any help you could offer
展开 | 选择 | Wrap | 行号
推荐答案
请在表格中附上包含数据的表格所以我们有一些工作要做。
!! XLS文件必须是ZIPPED !!
Please is it possible to attach in Bytes the sheet with the data so we have something to work on .
!! XLS files must be ZIPPED !!
感谢您的回复,我真的很感激。附件是供参考的文件。如上所述,我想在一段时间内添加一个字段。如果任务计划为让我们说三天(或24小时),那么它将在日历上显示三天。
Thank you for responding, I really appreciate it. Attached is the file for reference. As stated I would like to add a field for a duration. If a task is scheduled for let''s say three days (or for 24 hours) then it would show three days on the calendar.
我已经分析了代码。
你想要的是例如一个从1-2-2010开始并且持续时间为50小时的任务,这将表示为(50/8 = 6.25天)7个小区(1-2-2010,2-2 ......,...,7-2-2010)?
如果是这样,你必须发送到子PopulateCalendar ;也是范围HOURS。
在SubPopulateCalendar中你必须在oRangeDates.Cells(iRow,1)中循环到7。并计算7sCell。并在这些单元格中添加数据。
这种想法对你好吗?
I have analyzed the code.
You want that for example a task that starts on 1-2-2010 and has a duration of 50 hours, this will be represented in (50/8=6.25 days) 7 cells (1-2-2010,2-2..,...,7-2-2010)?
If so, You have to send to the sub "PopulateCalendar" also the range HOURS.
In the Sub "PopulateCalendar" You have to loop until 7 in "oRangeDates.Cells(iRow, 1)" and calculate the 7 "sCell" and add the data in these cells.
Is this way of thinking OK for You?
这篇关于如何修改代码以包含持续时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文