+ Reply to Thread
Results 1 to 12 of 12

Copying Range

  1. #1
    Registered User
    Join Date
    11-10-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    16

    Copying Range

    Hi, first time poster here.

    I'll get right to my problem.
    I'm currently trying to make a button, which when pressed inserts data from one part of the worksheet to another part.
    The thing is, I only want it to copy the data not the actual formulas present in the cell.
    Currently I am using Range(cell) = Range (orginal cell) for each cell, but it have to be an easier way?

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Copying Range

    Hi,

    Try this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-10-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Copying Range

    Nice, thanks

    Any way to remove the outline of the copied area afterwards? You know the dashed lined around A6 in this case

  4. #4
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Copying Range

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-08-2011
    Location
    Leicester, England
    MS-Off Ver
    Excel 2007
    Posts
    157

    Re: Copying Range

    after cutting it you might also want to add

    Please Login or Register  to view this content.
    as often I hate looking at a Highlighted box in the middle of an excel sheet where you know something's just been copy and pasted.

  6. #6
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Copying Range

    Nope, bad advise.

    Do not use select statements in vba code!

  7. #7
    Registered User
    Join Date
    11-10-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Copying Range

    Quote Originally Posted by Steffen Thomsen View Post
    Nope, bad advise.

    Do not use select statements in vba code!
    Why is this a bad advice?

  8. #8
    Registered User
    Join Date
    06-07-2010
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Copying Range

    There is no need to go through the paste board to do this operation.

    Try this:

    Please Login or Register  to view this content.
    And agreed, what exactly is wrong with .select?

    Can you also clarify what you mean by, dotted outline? Do you mean the outline that appears when you press copy? Or do you mean a border that you have around that cell?
    Last edited by hojkoff; 11-10-2011 at 08:51 AM.

  9. #9
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Copying Range

    Because selecting and activating sheets in vba is slow and a bad habbit

  10. #10
    Registered User
    Join Date
    06-07-2010
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    44

    Re: Copying Range

    What's the best way to change the sheet that is in view? Or to place the input box on a specific cell?

  11. #11
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Copying Range

    To change something on a sheet, reference it.

    Instead of activating and selecting cells like this
    Please Login or Register  to view this content.
    Then reference without selecting
    Please Login or Register  to view this content.
    Allways better, faster end easier to read if sheets, cell and so on are not being selected/activated

    Steffen Thomsen

  12. #12
    Registered User
    Join Date
    11-10-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Copying Range

    Quote Originally Posted by hojkoff View Post
    Can you also clarify what you mean by, dotted outline? Do you mean the outline that appears when you press copy? Or do you mean a border that you have around that cell?
    Yes, this(see underline).

    Steffen fixed it with Application.CutCopyMode

+ 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