View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
seangu seangu is offline
external usenet poster
 
Posts: 1
Default Excel VBA - delete hidden column in mergence status

I want to delete the hidden columns with following scripts

Sub Macro7()
For i = 65 To 80
temp = Chr(i) & ":" & Chr(i)
Columns(temp).Select
bTEST = Selection.EntireColumn.Hidden
If bTEST = True Then
Selection.Delete Shift:=xlToLeft
i = i - 1
End If
Next
End Sub

It can work when no mergence. But if D3:H3 cells are merged, and Colum
E is hidden, the loop goes to Columns("E:E"), the property feeds back i
still "False", in that case, the hidden column E can't be delet
correctly.

Pls help out, ^_^

seang

--
Message posted from http://www.ExcelForum.com