Results 1 to 4 of 4

VBA to break links when copying tab to new workbook

Threaded View

  1. #1
    Registered User
    Join Date
    03-07-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    11

    VBA to break links when copying tab to new workbook

    Hi everyone,
    I have an Excel 2013 workbook that I use a click button with VBA to copy and save the tab to a new workbook and it copies only the values as it should but...it also copies the button that is used in the original tab and keeps the link to that VBA. I would like to eliminate that button and link automatically within the original VBA. Is it possible to add something to this VBA or modify it so that the button with the VBA on the original page does not copy to the new workbook or at least remove the link to the VBA? Removing the button automatically would be nice but just removing the link automatically would be good enough. I am kinda new to this.
    This is the VBA that I use to copy the tab to the new workbook by clicking the button on the original page:

    Sub SaveCopy()
    ActiveSheet.Copy
    Set newbk = ActiveWorkbook
    newbk.ActiveSheet.Cells.Copy
    newbk.ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues
    
    InitialName = Format(Date, "mm-dd-yy") & ".xlsx"
    FName = Application.GetSaveAsFilename(InitialFileName:=InitialName, _
       fileFilter:="Excel Files (*.xlsx), *.xlsx")
    newbk.SaveAs Filename:=FName
    Range("E2").Select
    End Sub
    Thanks for any help,
    Foos Master
    "Foosball is Therapy"
    Last edited by Foos Master; 03-07-2015 at 09:31 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do I break links in a workbook?
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 PM
  2. [SOLVED] How do I break links in a workbook?
    By Alwebster6635 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  3. How do I break links in a workbook?
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  4. How do I break links in a workbook?
    By Alwebster6635 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] How do I break links in a workbook?
    By Alwebster6635 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1