Hi

I have a workbook which contain 15 sheets ,sheet1 is the data of
January, sheet2 is February and so on, the last 3 sheet have some data
for comparison.I am using a macro code to copy the data like this
Sub Update_sheet_April()
    If Sheets("APRIL").Range("b5") = 0 Then
    Application.ScreenUpdating = False
    Sheets("EMP REG").Select
    Range("B2:O200").Select
    Selection.Copy
    Sheets("APRIL").Select
    Application.Run "Compare.XLS!Module2.Import_fromregister"
    End If
End Sub
Sub Update_sheet_May()
    If Sheets("MAY").Range("b5") = 0 Then
    Application.ScreenUpdating = False
    Sheets("EMP REG").Select
    Range("B2:O200").Select
    Selection.Copy
    Sheets("MAY").Select
    Application.Run "Compare.XLS!Module2.Import_fromregister"
    End If
If it is possible the macro can remember the sheet which give command
and come back to the page after copying data I can reduce the size of
code.If possible pls give me the code

Regards
Rajesh

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to