+ Reply to Thread
Results 1 to 8 of 8

Remove VBA codes after copyin sheet to a new workbook

  1. #1
    Registered User
    Join Date
    04-19-2016
    Location
    Oisterwijk, Netherlands
    MS-Off Ver
    2013
    Posts
    4

    Remove VBA codes after copyin sheet to a new workbook

    I made a quotation template, where I fill in the production steps with time, and a price comes out. I do this for several steps, i.e. milling, grinding etc. In the same book another sheets is fed with the data of this quote that is the production chart that will go in to the factory. When done I made a button "save quotation" which export the quote chart and the production chart to a new workbook and saves it under the drawing number and revision number. I used this code for it:

    Please Login or Register  to view this content.
    The thing I want now is that in the new workbook I do not want the save button and codes any more. How should I do that?
    Last edited by phoenicx; 04-20-2016 at 09:20 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Remove VBA codes after copyin sheet to a new workbook

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Registered User
    Join Date
    04-19-2016
    Location
    Oisterwijk, Netherlands
    MS-Off Ver
    2013
    Posts
    4

    Re: Remove VBA codes after copyin sheet to a new workbook

    Changed it.

  4. #4
    Registered User
    Join Date
    04-19-2016
    Location
    Oisterwijk, Netherlands
    MS-Off Ver
    2013
    Posts
    4

    Re: Remove VBA codes after copyin sheet to a new workbook

    Someone has an answer for me?

  5. #5
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Remove VBA codes after copyin sheet to a new workbook

    Hi Phoenicx,

    In normal fact you shouldn't have the button there.
    Try this code:

    Please Login or Register  to view this content.
    Cheers,
    Ionut

  6. #6
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Remove VBA codes after copyin sheet to a new workbook

    If you have more sheets you can use:
    Please Login or Register  to view this content.
    Last edited by IonutC; 04-22-2016 at 05:33 AM.

  7. #7
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Remove VBA codes after copyin sheet to a new workbook

    I guess should have completely read what you want it to do, but this will open another excel file and copy info without the vba side to the current excel sheet

    Would something like this do what you want

    Please Login or Register  to view this content.
    Last edited by meabrams; 04-22-2016 at 05:37 AM. Reason: Didnt read completely whatwas needed

  8. #8
    Registered User
    Join Date
    04-19-2016
    Location
    Oisterwijk, Netherlands
    MS-Off Ver
    2013
    Posts
    4

    Re: Remove VBA codes after copyin sheet to a new workbook

    Besides copying this into my VBA, what else do I need to change in my sheet? Do I leave my original CODE and add this?

+ 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. [SOLVED] Remove link to another sheet within the same workbook
    By som3on3_10 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2014, 01:18 PM
  2. [SOLVED] save sheet as macro enabled workbook using codes
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-29-2014, 02:23 PM
  3. Copyin data from sheet to another if values are same
    By sirpaleena in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-24-2013, 11:19 AM
  4. Replies: 2
    Last Post: 09-27-2010, 09:41 AM
  5. remove sheet protection from every workbook in folder
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-28-2009, 05:48 PM
  6. Remove spaces from my zip codes
    By vonneffdobermans in forum Excel General
    Replies: 8
    Last Post: 05-10-2009, 09:01 AM
  7. [SOLVED] Save Sheet and Remove from Workbook
    By South Bend Larry in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-18-2005, 01:05 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