+ Reply to Thread
Results 1 to 10 of 10

change to worksheet to create files using VBA

  1. #1
    Forum Contributor
    Join Date
    09-28-2016
    Location
    Seattle, washington
    MS-Off Ver
    2016
    Posts
    330

    change to worksheet to create files using VBA

    Hello, The attached worksheet is used to generate files, a user will copy and paste any of the "Master Number"s from the DATA Tab to cell C3 on theCFS SHEET and the data will transfer over.

    I am looking to get this done automatically amending the existing VBA. I would like to have an option button on the DATA tab where if the user clicks this button it will loop thru all the master numbers and create the files and save them to my desktop as the masterbill number. Let me know if this sounds like something that can be done. with this example data it would create 4 files.
    Attached Files Attached Files

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: change to worksheet to create files using VBA

    It certainly can be done but what exactly do you want saved, CFS sheet only, multiple sheets, entire workbook ????
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: change to worksheet to create files using VBA

    Try this. It saves the CFS sheet as seperate file for each Master Number.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    09-28-2016
    Location
    Seattle, washington
    MS-Off Ver
    2016
    Posts
    330

    Re: change to worksheet to create files using VBA

    That is awesome bakerman2, thank you very much. I will need it to save the Devan sheet, and Freight tags also in each file. Sorry for not mentioning that. I really appreciate your help.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: change to worksheet to create files using VBA

    Change this

    Please Login or Register  to view this content.
    to this

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-28-2016
    Location
    Seattle, washington
    MS-Off Ver
    2016
    Posts
    330

    Re: change to worksheet to create files using VBA

    Awesome - I was trying to add in the other sheets on this line. So much to learn. Have a nice weekend, but this is now working as needed. Relly appreciate it!

    Please Login or Register  to view this content.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: change to worksheet to create files using VBA

    Have a nice weekend
    A nice weekend to you too but I think bakerman says it all (yes I really am a selfemployed baker )

    Glad to help and thanks for rep+.

    PS You can remove the WorkSheetChange-event from CFS sheet because all is handled in the code I gave you.
    Last edited by bakerman2; 05-31-2019 at 11:26 AM.

  8. #8
    Forum Contributor
    Join Date
    09-28-2016
    Location
    Seattle, washington
    MS-Off Ver
    2016
    Posts
    330

    Re: change to worksheet to create files using VBA

    Hi Baker, dont know if I need another post for this or not, But I wanted you to look at this as you solved the first part. I need to be able to print the FREIGHT TAGS for each file also. This was done before with this code. Any ideas how to get this worked into the code?

    Please Login or Register  to view this content.

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: change to worksheet to create files using VBA

    Give this a whirl.

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    09-28-2016
    Location
    Seattle, washington
    MS-Off Ver
    2016
    Posts
    330

    Re: change to worksheet to create files using VBA

    Thanks again Baker. I appreciate the time you put into 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. Help to create a worksheet selection change event code
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 08:46 AM
  2. [SOLVED] Create New Worksheet/Pivot Table for Each Change in Criteria
    By philwilliams80 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-15-2013, 11:05 AM
  3. [SOLVED] Create new Worksheet for each change in Column B
    By philwilliams80 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2013, 02:39 PM
  4. Create a change History on seperate worksheet.
    By todmac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 03:28 PM
  5. I need to create a macro that will change the formatting of a worksheet
    By Bryeguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2012, 01:29 PM
  6. Macro to create a new worksheet at each change in data
    By that guy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2010, 07:39 PM
  7. Replies: 2
    Last Post: 04-15-2005, 12:06 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