I have no issues with the execution of my program it does what I need it too. Although, I have this annoying problem with it. Whenever I have this Do Until code loop through an excel sheet to find the next blank row for data input. It displays to the user every row number it counts that has data in it. How do I silence/suppress it. It's very annoying and may be confusing to others who do not understand what is happening.
Here is the problematic line of code:
Do {$z} until ($WS.Cells.Item($z++, 6).Value2 -eq $null)
Here is an example of what this line of code does on the output terminal to the user, can someone please explain to me how I stop it from listing every undesired row to the user.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
You can do this:
Do {# Nothing} Until ($WS.Cells.Item($z++,6).Value -eq $null)
Or
Do {$z++} Until ($WS.Cells.Item($z,6).Value -eq $null)
Because $z will display the value of the variable.