Consulting

Results 1 to 4 of 4

Thread: Solved: Substitute Workbook Source Name?

  1. #1

    Solved: Substitute Workbook Source Name?

    I wanted to swithc the way I capture the workbook source name from an input box entry to the active workbook. But this line returns error 438
    Object doesn't support this propery of method.
    Is this a valid method to capture workbook name and if so what is incorrect here?

    [VBA]
    'WbsName = Application.Inputbox("Enter PO File Name")
    WbsName = Application.ActiveWorkbook
    [/VBA]

    thanks,

    Doug
    my site: www.ecboardco.com
    was built w/ a majority of the assistance from the board members here... thanks VBAX.

    Just because I see something, doesn't mean that what's actually happening is what I see.

    You don't get from 0-90 by standing still!

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Good morning Doug,

    [vba]WbsName = Application.ActiveWorkbook.Name[/vba]
    Or just
    [vba]WbsName = ActiveWorkbook.Name[/vba]


    Matt

  3. #3
    Hi Matt,
    Thanks.... Darn it.... thought I had that one....
    my site: www.ecboardco.com
    was built w/ a majority of the assistance from the board members here... thanks VBAX.

    Just because I see something, doesn't mean that what's actually happening is what I see.

    You don't get from 0-90 by standing still!

  4. #4
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Another thing you could do, depending on what you need the workbook name for, is to set a workbook variable for the activeworkbook[vba]dim WB as workbook
    set wb=activeworkbook[/vba]Then you'd only have to use WB to refer to the active workbook (instead of something like Workbooks(WbsName) which you could be doing)

Posting Permissions

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