Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
inserted code into project but can't run it in run dialogbox
I started a new Excel document with arbitrary column
heading with some actually having data in that column. I went to toolsmacro VBA editor created a new module pasted this code in: (it deletes columns having no data in them) Public Sub GetRidofEmptyColumns(DeleteRange As Range) Dim cCount As Integer, c As Integer If DeleteRange Is Nothing Then Exit Sub If DeleteRange.Areas.Count 1 Then Exit Sub With DeleteRange cCount = .Columns.Count For c = cCount To 1 Step -1 If Application.CountA(.Columns(c)) = 0 Then .Columns(c).EntireColumn.Delete End If Next c End With End Sub How to I get this to run? thank you, den |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching Multiple Timesheets for a project code and then.... | Excel Worksheet Functions | |||
reactivate DialogBox | Excel Discussion (Misc queries) | |||
Dialogbox Creation | Excel Discussion (Misc queries) | |||
Exel dialogbox/dialogboks | Excel Discussion (Misc queries) | |||
OpenFile dialogbox | Excel Worksheet Functions |