I have an excel vba code that finds a particular cell in a sheet. It uses the Find
method form the excel libraries. Here is the code
objRange.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows)
I need to do the same thing in powershell. But this method has a total of 9 arguments. How to ignore the other optional arguments in powershell. Something like this?
$range.Find("*", "", "", "", $xlByRows, $xlPrevious, "", "", "")
Here is the documentation of Range.Find
Method
$null
doesn't work, but according to this answer you can use[Type]::Missing
:I addressed this by creating overload methods that calls the core method with the value I want. e.g. I want the user to be able to specify the number of processed records or call the "Increment" method and then just call "WriteProgress" with no argument:
}