Results 1 to 4 of 4

VB Code to Copy Range without formula and values only

Threaded View

rizmomin VB Code to Copy Range without... 06-03-2015, 08:48 PM
karedog Re: VB Code to Copy Range... 06-04-2015, 12:25 AM
JOHN H. DAVIS Re: VB Code to Copy Range... 06-04-2015, 10:18 AM
rizmomin Re: VB Code to Copy Range... 06-04-2015, 12:04 PM
  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to Copy Range without formula and values only

    Hello:


    I need a VB Code to backup employee schedule.

    I am using below code but it malfunction and not copying correctly.
    I only wants to copy the value and not the formula.

    Let me know if you have any questions.
    Thanks.

    Riz

    Sub Backup()
    Dim ws As Worksheet, wb As Worksheet, r As Long
    Set ws = ActiveWorkbook.Sheets("Work Schedule")
    r = Range("D3:D3")
    'Set wb = ActiveWorkbook.Sheets("Backup")
    Set wb = Sheets("Backup")
    
     With Application
            .Calculation = xlCalculationManual
            .ScreenUpdating = False
            .EnableEvents = False
            .DisplayAlerts = False
            End With
    
    wb.Range("B" & r).Value = ws.Range("B3:P32").Value
    
    
     With Application
            .Calculation = xlCalculationAutomatic
            .ScreenUpdating = True
            .EnableEvents = True
            .DisplayAlerts = True
        End With
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Code to copy values to formula's in other sheets
    By Miehjs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2015, 07:50 PM
  2. VBA code to copy text/values only from a range
    By IvanJames in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-29-2014, 03:18 PM
  3. Replies: 2
    Last Post: 07-19-2013, 02:54 PM
  4. Replies: 3
    Last Post: 03-26-2013, 06:06 PM
  5. [SOLVED] Code to copy formula to variable range
    By Snowsride in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2005, 05:45 PM

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