Consulting

Results 1 to 8 of 8

Thread: Document workbook Properties

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location

    Document workbook Properties

    I need something that can go through a workbook and create a report with the following information:
    1. Owner
    2. File location
    3. Last accessed date
    4. Tab names
    5. Formulas and links by tab
    6. Macros with the code
    Thanks
    Montrof

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    This should get you started.


    Option Explicit
    
    Sub FileProperties()
    Dim Owner           As String
    Dim Path            As String
    Dim AccessDate      As Date
    Dim ws              As Worksheet
    Dim Tabs            As String
    Owner = ActiveWorkbook.BuiltinDocumentProperties("Author")
    Path = ActiveWorkbook.Path
    AccessDate = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
    For Each ws In Worksheets
          Tabs = Tabs & ws.Name & vbNewLine
    Next
    MsgBox Owner & vbNewLine & _
    Path & vbNewLine & _
    AccessDate & vbNewLine & Tabs
    End Sub

    For 5 do you want all formulas and hyperlinks in each sheet?

  3. #3
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    Thank you for the start. Is there a way to get all the vba modules and code and put them into a report and also the formulas that are used?

  4. #4

  5. #5
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    great, how do i make it so that the results are posted to a worksheet instead of a message box?

  6. #6
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by montrof
    great, how do i make it so that the results are posted to a worksheet instead of a message box?
    this depends on what you really want to do. If the data is for a single workbook, then simply post individual items to individual cells. For example, if the target worksheet is "BookData", then try:


    Worksheets("BookData").Cells(1,1) = "Owner = " & Owner
    Worksheets("BookData").Cells(2,1) = "Path = " & Path
    Worksheets("BookData").Cells(3,1) = "AccessDate = " & Access
    Worksheets("BookData").Cells(4,1) = "Tabs = " & Tabs
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  7. #7
    VBAX Regular
    Joined
    Jul 2004
    Posts
    14
    Location
    Thanks for all the help!!!!!

  8. #8
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Glad to help.

    Take Care

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •