LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
sds sds is offline
external usenet poster
 
Posts: 4
Default help again please tom?!

Im using this macro, i dont get any errors but it doesnt
clear rows a or b if rows c:u are unpopulated which is
what im aiming for.
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+Shift+S
'
ChDir "C:\Documents and Settings\sds\Desktop"
Workbooks.Open FileName:= _
"C:\Documents and
Settings\sds\Desktop\MORNINGPREALERT.xls"
Range("A1:U7").Select
Selection.ClearContents
Cells.Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Delete Shift:=xlUp
Dim rng As Range, cell As Range
Set rng = Range(Range("C1"), Cells(Rows.Count, 3).End
(xlUp))
For Each cell In rng
If Application.CountA(cell.Resize(1, 18)) = 0 Then
Cells(cell.Row, 1).Resize(1, 2).ClearContents
End If
Next

Cells.Select
Selection.Cut
Workbooks.Add
ActiveSheet.Paste
ActiveWorkbook.SaveAs FileName:= _
"C:\Documents and Settings\sds\Desktop\MORNING
LABELS.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWindow.Close
ActiveWindow.Close
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"