hi guys this is very simple I am newsie and need you help
the following part is not working for me. I dont know I guess the fault is in the if statement below
Dim chkFl15
chkFl15 = 0
Dim cnt15
Dim mark15
cnt15 = objWorkbook.Worksheets.Count
mark15 = 1
Do While mark15 <= cnt15
If objworkbook.Worksheets(mark15).Name = "Lac-Sac-Rac" and objworkbook.Worksheets(mark15).Name = "Utran Relations" Then ----- this statement
chkFl15 = 1
exit do
end if
mark15=mark15+1
Loop
if chkFl15 = 0 then
objtxtStream.Writeline "Scripts for Relations cannot be generated- Missing Utran relations or Lac-Sac-Rac Tab"
else
the following part is not working for me. I dont know I guess the fault is in the if statement below
Dim chkFl15
chkFl15 = 0
Dim cnt15
Dim mark15
cnt15 = objWorkbook.Worksheets.Count
mark15 = 1
Do While mark15 <= cnt15
If objworkbook.Worksheets(mark15).Name = "Lac-Sac-Rac" and objworkbook.Worksheets(mark15).Name = "Utran Relations" Then ----- this statement
chkFl15 = 1
exit do
end if
mark15=mark15+1
Loop
if chkFl15 = 0 then
objtxtStream.Writeline "Scripts for Relations cannot be generated- Missing Utran relations or Lac-Sac-Rac Tab"
else