I was curious if anyone had a solution for my problem?

Here is some code i start with:

Sheets("A").Select
Range("A2").Select

This is where i select my starting point

On this row i used the macro recorder and i copied 4 columns from
worksheet A to worksheeet B

But the problem is that when i am done i see the my cell in worksheet
B still highlighted as i return to worksheet A?

My main module has a loop:

Do Until IsEmpty(ActiveCell)

  If ActiveCell.Value = abc Then

call Copy(disType, ShType, index)
...copy and paste columns from sheet A to sheet B

  Else ActiveCell.Value = def Then
call Copy(disType, ShType, index)
...copy and paste columns from sheet A to sheet B

Loop

Private Sub Copy(disType As String, ShType As String, index As String)

copy paste code from macro recorder here

End Sub

I am kind a new to VBA but seems like i need a way to keep the current
position between sheets. Anyone have any ideas?

Andrew

-- 
----------------------------------------------------------------------------------
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