+ Reply to Thread
Results 1 to 3 of 3

Beef up code to diversify handling of active workbooks

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Beef up code to diversify handling of active workbooks

    Hello,
    First, I know next to diddly squat about VBA. Next,
    I'm trying to make sense w/the following code that I have. I need some help in understanding how it works and to make it handle more conditions.

    To start off at the beginning:
    If Active Workbook.Sheets.Count=1, I will
    assume, it reads all workbooks,that have only 1 sheet and the sheet name
    is irrelevant.

    Next, if the code comes across a workbook w/multiple sheet(more than 1 sheet),it will only read sheets named,BILLMAT or MASTER. But, what if it comes across a single sheet workbook named "BILLMAT" or "MASTER, will
    it be able to read the values under the single worksheet condition?
    Next, If both BILLMAT and MASTER sheets are setup w/the same format and
    indentical cell values, Can't a single argument include both sheets:
    Sheets("BILLMAT","MASTER).Activate

    Can this ,Find(what:="NUMBER"),be changed?: What can be sub'd in besides "NUMBER"?

    What does:Resize(1, 3).Value = .FoundFiles(i) do?
    What does:sf in sf.datelastmodified mean? (i'm guessing single folder?)



    \
    Please Login or Register  to view this content.

    Any information to help me understand or beef up the code is appreciated.

    I've also attached a BOM workbook file that, code is getting hung up on.
    Fixing the code to include reading this file is a start.

    Thanks,

    bdb
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Beef up code to diversify handling of active workbooks

    Here's another file that it's getting hung up on.
    When I run my code,
    Why doe the following line gets flagged for the error? when the file
    that it stops on has a sheet named "PULL" not "BILLMAT"
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Beef up code to diversify handling of active workbooks

    Can anyone give me some feedback on the previous posts?
    Also,
    In the code below, Theres 2 conditions that can be actioned. Actions for wb's w/ single sheets and wb's w/multiple sheets. If mutiple, then a specific name of sheet to action is given. As you can see, there 3 multi sheets.
    If all three sheets to action are setup the same, can they all be combined
    onto a single sentence /line?
    Please Login or Register  to view this content.
    2.Can I also setup the muti sheets like a single
    Stating something like:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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