Thank you for the hint.
I got it figured out now.

Andrew

On Jul 10, 9:19 pm, "Rajan_Verma" <rajanverma1...@gmail.com> wrote:
> Use Application.CutCopyMode=False after Copy the Range
> Please attach your file.
>
>
>
>
>
>
>
> -----Original Message-----
> From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
>
> On Behalf Of Andrew
> Sent: Monday, July 11, 2011 4:28 AM
> To: MS EXCEL AND VBA MACROS
> Subject: $$Excel-Macros$$ Copy and paste between sheets problem?
>
> 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 athttp://www.excel-macros.blogspot.com
> 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below 
> linkhttp://www.facebook.com/discussexcel

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