+ Reply to Thread
Results 1 to 3 of 3

VBA Hangs after paste!!

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    26

    VBA Hangs after paste!!

    Hi, could somebody please take a look at the code below and tell me what am i doing wrong?

    I first copy 3 different columns from a sheet to a sheet called "Temp".
    There i used advanced filter to copy the unique set of rows (Till then it runs just fine!)

    Then i activate another sheet and try to paste the data. It is now that the VBA hangs for good 5 minutes! I am not sure what am i doing wrong.. I don't understand what VBA could be doing for such a long time! please guide me!

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 03-05-2009 at 01:45 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: VBA Hangs after paste!!

    You don't need to activate or select ranges or sheets.

    Can you attach an example workbook & indicate wht you want the code to do.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    02-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    26

    Question Re: VBA Hangs after paste!!

    I cannot attach the workbook. Let me also mentions, I am pretty new to VBA programming.

    I have one sheet with raw data. I need few pivot tables out of it which also needs certain modified columns. Like few pivot tables are at account level, few are at detail level.
    Now the code that you thought was similar, is there in quite a few modules

    I had to implement things quickly hence could not think of another alternative.

    Can you please explain why would select and activate would make it longer? No other modules take this long in spite of having select and activate statements.

    In this case, it takes like 5-6 minutes.

    Also, if i dont activate the sheet, how would it know on which sheet it should perform the calculations?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1