Hi Vishwa,
 
Sub DeleteBlank()
    On Error Resume Next
    ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    On Error GoTo 0: On Error GoTo -1: Err.Clear
End Sub
 
Above is the function need to call in the button click event in sheet1 as 
shown below.
Private Sub CommandButton1_Click()
    Call ClearWeekends
    Call DeleteBlank
End Sub
 
Let me know if it is helpful to you.
 
 
 
Regards,
Lalit Mohan

On Wednesday, 27 June 2012 00:46:00 UTC+5:30, Viswanathan Yoganathan wrote:

>  Hi all,
>
>  
>
> In the attached excel, I want to delete the week ends whereas at the same 
> time the position of the month should not move.  It means the Feb month 
> should start from A34, March month should start from A64.  Please advise 
> using VBA macro.
>
>  
>
> Thanks,
>
> Vishwa
>
> "CONFIDENTIALITY NOTICE: This message and any attachment are confidential 
> and may also be privileged. If you are not the intended recipient of this 
> e-mail you may not copy, forward, disclose or otherwise use it or any part 
> of it in any form whatsoever. If you are not the intended recipient please 
> telephone or e-mail the sender and delete this message and any attachment 
> from your system."
>

-- 
-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com


Reply via email to