Storing column references in a variable
Jim,
Thanks for your help. I have tomorrow off, so I won't be able to try out
your changes until Friday. I will let you know how they work out.
Thanks again,
Conan
"Jim Cone" wrote in message
...
Conan,
I changed the two lines marked by asterisks.
See if that meets your needs...
'-------------------------------
Range("A1").Select
Cells.Find(What:="Balance", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True).Activate
intLastCol = ActiveCell.Column + 1
Range(Columns(intLastCol), Columns(intLastCol + 6)).Select '*****
Selection.EntireColumn.Delete
Rows(intLastCol + 1 & "1").Select '*****
Selection.End(xlDown).Select
If ActiveCell.Row < 65536 Then
MsgBox "Still Data in this column. Please delete more columns.", _
vbOKOnly, "Error!!!!!!!!"
Exit Sub
End If
'--------------------------
Regards,
Jim Cone
San Francisco, USA
|