29-03-22 08:35 AM
29-03-22 11:40 AM
29-03-22 02:23 PM
Dim worksheet As Object
worksheet = GetWorkbook(handle,Nothing).ActiveSheet
Const xlCellTypeLastCell As Integer = 11
Dim FirstColumn As Integer = 1
Dim LastColumn As Integer = worksheet.Cells.SpecialCells(xlCellTypeLastCell).Column
For i As Integer = LastColumn To FirstColumn Step -1
If worksheet.Application.CountA(worksheet.Columns(i)) = 0 Then
worksheet.Columns(i).Delete
End If
Next
10-07-24 01:20 PM
I am guessing this issue is solved judging by the age of the post but I solved a similar issue with this Utility.