+ Reply to Thread
Results 1 to 11 of 11

split worksheet to new file name for some path.

  1. #1
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    split worksheet to new file name for some path.

    Hi
    I've tried this code which some experts suggested me but it's run the new file with specific path.
    but new file is contain all sheet ("button" & "data")which actually, i want to split only "data" sheet and to save as new file name for "data" sheet.
    Please suggest that i'm wrong for which code.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: split worksheet to new file name for some path.

    create copy of worksheet into new workbook then SaveAs
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    Hi
    pls show me the code?

  4. #4
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    Hi
    Anyone know about this please advised.
    thanks.

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: split worksheet to new file name for some path.

    actually i ran your file
    adjusting the path so it works on my computer and it works as you want it to?

    did you expect a different file format? or to have the same vba code in the saved file as well?

  6. #6
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    Yes i expect a difference format fow raw data . it was impact fir vba code?

    So strange.
    please advised.

  7. #7
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    [Code]ActiveWorkbook.SaveAs Filename:="D:\test\" & "NAME_" & LValue & ".xlsx", _
    FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

    End Sub
    [Code]

    i can use ActiveWorksheet instead?

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: split worksheet to new file name for some path.

    so when you run it
    the file you saveas has both data and button sheet?

    if so

    highlight this row of code and press f9
    Please Login or Register  to view this content.
    now run the code and when it stops, is there a seperate file with data tab only?

  9. #9
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    yes. both of data and button sheet but i need to separate file and save as new file for data sheet only.

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: split worksheet to new file name for some path.

    what happens with the debug method i pointed out in post #8?

    do you get the "data" sheet on a new workbook?

  11. #11
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    308

    Re: split worksheet to new file name for some path.

    Hi
    Yes, i would like to separate data sheet in to new file only this sheet. how i can write the code?
    please advised.

+ 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] Help with formula to pick up a file path to a workbook from a cell in the same worksheet
    By Laura_93 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-13-2015, 10:39 AM
  2. VBA to save worksheet with a prefined file path and file name
    By KRUDA79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2014, 08:27 AM
  3. [SOLVED] Referencing File Path - Dynamic Cell Input for Worksheet
    By Chomie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-23-2013, 04:38 PM
  4. Replies: 2
    Last Post: 04-11-2012, 12:55 PM
  5. File path including a worksheet value
    By charlezzz in forum Excel General
    Replies: 5
    Last Post: 08-22-2008, 08:23 AM

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