+ Reply to Thread
Results 1 to 6 of 6

VB Code to create Blank Excel file

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to create Blank Excel file

    Hello:

    Please refer to attached file.

    I am trying to use below code to create Blank Excel files with certain names as in the attached file.
    It seems to error out, pls help identify the problem.

    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VB Code to create Blank Excel file

    Try adding the FileFormat argument to the SaveAs

    As .xlsb is not usually the default try xlExcel12
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: VB Code to create Blank Excel file

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to create Blank Excel file

    HELLO:

    It works but some how it is saving all files in C:\Dropbox\PersonalXLB\ folder.

    Cell E1 has C:\GoogleDrive\1All DQ Monthly Reports\All-BankStatements\ as location

    So all files should be saved at above location

    Pls help

    Thanks

    Riz
    Last edited by rizmomin; 03-01-2019 at 11:23 AM.

  5. #5
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: VB Code to create Blank Excel file

    That's weird.
    I've changed E1 to "D:\ForumFiles\" and all worksheets appeared there.

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

    Re: VB Code to create Blank Excel file

    Remove all ".xlsb" from names in column C, then use this one.
    Please Login or Register  to view this content.
    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.

+ 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. VBA Code to create new excel files based on content of cell from a template file
    By alan.sluder in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-30-2018, 04:33 AM
  2. A VBA code to create new excel file.
    By js24722 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2016, 05:49 AM
  3. code to Create excel file from pdf file
    By mokht in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2015, 07:13 PM
  4. Replies: 0
    Last Post: 06-11-2014, 03:10 AM
  5. Replies: 0
    Last Post: 02-13-2014, 03:07 AM
  6. Replies: 3
    Last Post: 09-30-2011, 04:35 AM
  7. code to create new excel file
    By ashishprem in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2006, 01:20 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