07-04-22 09:43 AM
Hi,
Can the template Get Worksheet As Collection be altered so it only gets visible data?
Dim ws as Object = _
GetWorksheet(handle, workbookname, worksheetname, False)
' Do we have a sheet?
sheetexists = ws IsNot Nothing
' No sheet? No entry.
If Not sheetexists Then Return
ws.Activate()
worksheetCollection = GetWorksheetUsedRangeAsDataTable(ws.UsedRange, True)
Since my collection is too large I'm applying an AutoFilter using this:
Dim worksheet as Object
Worksheet = GetWorkbook(handle, Nothing).ActiveSheet
worksheet.UsedRange.AutoFilter (Field:= FieldToBeFiltered, Criteria1 := criteriaToFilter)
But I'm having a hard time extracting this data without the VBO trying to get the whole sheet which breaks the memory.
Best Regards
Atli
Answered! Go to Answer.
07-04-22 10:23 AM
07-04-22 10:23 AM