Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

VBA skips code when "NA" is returned for previous line.

$
0
0

Hi,

I have a project vba which updates tasks from a Excel file.It creates a summary task and then subtasks.And for each summary and sub tasks some attributes are set.This is done by a separate sub routine.

My problem is some lines of the subroutine are skipped when the value of the .date attribute is "N/A"

.Date1 = mileEnd(CStr(program(j, 1)), "", timing)
.Date2 = mileEnd(CStr(program(j, 1)), "", timing)
.Date3 = mileEnd(CStr(program(j, 1)), "", timing)

.Date4 = mileStart(CStr(program(j, 1)), "", timing)
.Date5 = mileEnd(CStr(program(j, 1)), "", timing)
.Date6 = mileStart(CStr(program(j, 1)), "", timing)
.Date7 = mileEnd(CStr(program(j, 1)), "", timing) 

If .date4 and .date5 is "n/a" then the .date6 and .date7 lines are skipped.

Can anyone tell why this is happening?



Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>