+ Reply to Thread
Results 1 to 4 of 4

Unlink button from worksheet copied from another file

  1. #1
    Registered User
    Join Date
    10-07-2014
    Location
    Salvador da Bahia, Brazil
    MS-Off Ver
    2013
    Posts
    39

    Unlink button from worksheet copied from another file

    Hey guys.

    I was trying to create a Gantt chart when I came across a fairly nice Gantt chart here in the forum. So I downloaded the file from Excel Forum's server and used it as a template. After a good amount of editing I have the chart working beautifully with the data from my own workbook. However, I was left with two problems:

    1. Whenever I hit the "update chart" button in my file's Gant Chart worksheet, although it does update my chart, it opens the original file I downloaded to use as a template. If I delete the file, the button will not work, hence it will not update my chart.

    2. In my workbook, I changed the worksheet name from "Gantt Chart" to "Active Projects" and the button stopped working. In my attempts to correct this problem, I went to VBA and replaced whatever "Gantt Chart" text I found with "Active Projects" but obviously it didn't work. I'm not that experienced in Excel. So I undid all changes in order t make it work as it does now, but I can't change the name of the worksheet.

    What should I do?

    I appreciate any help.

    Attachment 403444

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Unlink button from worksheet copied from another file

    Right click the button and select "assign macro" . Delete the link in the macro name box, select the workbook from the "macros in" dropdown, then select the desired macro.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-07-2014
    Location
    Salvador da Bahia, Brazil
    MS-Off Ver
    2013
    Posts
    39

    Re: Unlink button from worksheet copied from another file

    Hi protonLeah. Thanks for the reply.

    I followed your advice but when I got to the "select the desired macro" stage I realized there wasn't such thing as a macro for that button. So I went back to the original file which I used as a template and then compared its VBA code with the one in the file I am editing. Guess what? I copied their code that was typed in something called "Module", created a "Module" back in my file's VBA code, pasted the copied code into it, followed your steps and assigned the macro to the button. Now it works beautifully. Not only that: I managed to change the worksheet's name too!

    The code was:
    Please Login or Register  to view this content.
    And now it looks like this:
    Please Login or Register  to view this content.
    Thanks for the help mate!

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Unlink button from worksheet copied from another file

    You're welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copying multiple worksheet so that copied hyperlinks link to new copied sheets
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 02:37 PM
  2. Cells from one worksheet copied/deleted from other sheets in same file
    By scopist in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 08-16-2012, 11:55 AM
  3. Generating text file out put from worksheet on click of button based on parameters
    By sethumurugan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2011, 04:40 AM
  4. [SOLVED] Unlink a file ??
    By Kane in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-05-2006, 04:10 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