I have this code in a Excel Macro, so, i need execute this code in a .vbs (scripts), i dont know the way to can pass, i'm amateur in this area, so, i need to help for can do that.
Sub RemoveHiddenRows()
Dim xRow As Range
Dim xRg As Range
Dim xRows As Range
On Error Resume Next
Set xRows = Intersect(ActiveSheet.Range("A:A").EntireRow, ActiveSheet.UsedRange)
If xRows Is Nothing Then Exit Sub
For Each xRow In xRows.Columns(1).Cells
If xRow.EntireRow.Hidden Then
If xRg Is Nothing Then
Set xRg = xRow
Else
Set xRg = Union(xRg, xRow)
End If
End If
Next
If Not xRg Is Nothing Then
Else
End If
End Sub
I try called the excel that i will use for this
set app = CreateObject("Excel.Application")
app.Visible = True
Set objWB = app.Workbooks.Open("C:\REPORTE_DE_CREDITOS_MODERNO\RPT\FACTURAS.XLS")
set objWS = app.ActiveWorkBook.WorkSheets(1)
But, i dont know how continue