+ Reply to Thread
Results 1 to 6 of 6

code to open each workbook in folder

  1. #1
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    code to open each workbook in folder

    Hi,

    I have some code that makes desired changes to my workbooks.

    I would like to add to this code so that it opens each workbook in my folder then applies my code

    I need the code to open the workbook>my code>next workbook

    I hope this makes sense

    Thanks
    Kevin

  2. #2
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: code to open each workbook in folder

    this helps?

    https://www.thespreadsheetguru.com/t...a-given-folder

  3. #3
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: code to open each workbook in folder

    I think it does.......I am not very good with VBA

    I assume I replace

    'Change First Worksheet's Background Fill Blue
    wb.Worksheets(1).Range("A1:Z1").Interior.Color = RGB(51, 98, 174)

    for my code?

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: code to open each workbook in folder

    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: code to open each workbook in folder

    How are we to know what needs changing and where if we don't have an explanation of your needs except opening all the workbooks.

    I assume I replace

    'Change First Worksheet's Background Fill Blue
    Please Login or Register  to view this content.
    for my code?

  6. #6
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: code to open each workbook in folder

    I have the code to perform the tasks I need, I needed to know which element of the code provided in #2 was to be replaced with mine

+ 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] Excel VBA code for selecting a folder then search & open specified files in that folder
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2021, 03:09 AM
  2. Open another workbook from VBA on same folder
    By meus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2015, 07:07 AM
  3. [SOLVED] VBA to Open Folder and Select workbook (not Open Workbook)
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-05-2015, 01:41 PM
  4. Code to create New Folder (if doesn't exist) and then Save Workbook to folder
    By jenhawley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-10-2013, 03:09 PM
  5. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  6. open the workbook in a folder
    By ccs_1981 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2010, 03:27 AM
  7. [SOLVED] Open a workbook from within a specified folder
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2005, 07:35 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