Results 1 to 4 of 4

Thread: Excel VBA

  1. #1
    Join Date
    Nov 2008
    Posts
    1,192

    Excel VBA

    I want to copy a sheet from a workbook to another workbook without linking. A late copy and paste graphics and value (which can be transformed into a picture if needed) in a workbook created for the occasion (and possibly not registered or named or anything)

    Code:
    Private Sub CommandButton1_Click () 
    UserForm2.Hide 
    Sheets ("Export"). Copy 
    End Sub
    This works but the copy actually contains links to the original, which I do not want to.

  2. #2
    Join Date
    May 2008
    Posts
    979

    Re: Excel VBA

    My proposal:

    Move a sheet
    Check "Create a copy"
    Copy the newly copied sheet
    Clear the value

  3. #3
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Excel VBA

    This is nice, but I need that it happens in VBA, as the title of the topic suggests.

  4. #4
    Join Date
    May 2008
    Posts
    271

    Re: Excel VBA

    Code:
    Sub Macro1 () 
      ' 
      'Macro1 Macro 
      'Macro recorded 15/07/2008 by the  
      ' 
        Sheets ("Sheet1").Select 
        Sheets ("Sheet1").Copy  
      End Sub
    Or for an already existing workbook:

    Code:
    Sub Macro1 () 
      ' 
      'Macro1 Macro 
      'Macro recorded 15/07/2008 by the  
      ' 
        Sheets ("Sheet1").Select 
        Sheets ("Sheet1").Copy Before: = Workbooks ("destination.xls).Sheets(1) 
      End Sub

Similar Threads

  1. Replies: 6
    Last Post: 17-02-2012, 01:18 PM
  2. Cell format errors appears in Excel 2003 but not in Excel 2000
    By @nki$achi in forum MS Office Support
    Replies: 1
    Last Post: 24-01-2012, 05:00 PM
  3. Excel 2007 file fails to get permission to open in Excel 2011
    By Raju Chacha in forum Windows Software
    Replies: 6
    Last Post: 13-01-2012, 09:17 PM
  4. Replies: 6
    Last Post: 17-05-2011, 10:00 PM
  5. Replies: 4
    Last Post: 13-02-2011, 10:37 AM

Tags for this Thread

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
  •  
Page generated in 1,717,386,183.18620 seconds with 16 queries