Results 1 to 5 of 5

Application.InputBox Type:=8 FullPath

This is a discussion on Application.InputBox Type:=8 FullPath within the Excel Questions forums, part of the Question Forums category; ref.: Application.InputBox Type:=8 FullPath hi and Many Thanks in advance! I have >=2 workbooks open I am using Dim AAA ...

  1. #1
    Board Regular
    Join Date
    Mar 2005
    Posts
    252

    Default Application.InputBox Type:=8 FullPath

    ref.: Application.InputBox Type:=8 FullPath

    hi and Many Thanks in advance!

    I have >=2 workbooks open

    I am using

    Dim AAA as Range
    Set AAA = Application.InputBox( Prompt:=tMsg, Title:=tTitle, Type:=8)

    to refer to a cell whithin one other workbook different tant the active one.

    I can get the value of the selected workbook's range

    but how can I know the FullPath of the selected cell whithin that Workbook?

    Do I need a UserForm?

    Thanks!

  2. #2
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    14,146

    Default Re: Application.InputBox Type:=8 FullPath

    Can you really select a cell in another workbook with the input box? I didn't think that was possible.

    Presumably if you can select a cell, the cell you've selected is already in the activeworkbook...
    Code:
    Msgbox ActiveWorkbook.FullPath

    If for some reason that's not true, this would work in a pinch
    Code:
    Dim wb as workbook
    Set wb = ActiveWorkbook
    AAA.Select
    msgbox ActiveWorkbook.FullPath
    wb.Select
    There's parent properties but I've never had much luck with them. Maybe someone else here can show the way... Regards.

    Using: Office 2007/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

  3. #3
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    East Sussex
    Posts
    22,910

    Default Re: Application.InputBox Type:=8 FullPath

    You would need:
    Code:
    Msgbox AAA.Parent.Parent.Fullpath
    FWIW.

  4. #4
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    East Sussex
    Posts
    22,910

    Default Re: Application.InputBox Type:=8 FullPath

    Though it would be easier to use:
    Code:
    msgbox AAA.Address(external:=true)
    rather than fannying about with multiple parent properties!

  5. #5
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    14,146

    Default Re: Application.InputBox Type:=8 FullPath

    Msgbox AAA.Parent.Parent.Fullpath
    Thanks Rorya...I don't think I'd have figured this one out for years...!

    Reminds me of:
    Code:
    myRange.Name.Name
    AB

    Using: Office 2007/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com