Application.InputBox Type:=8 FullPath

drom

Well-known Member
Joined
Mar 20, 2005
Messages
527
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
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!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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.
 
Upvote 0
You would need:
Code:
Msgbox AAA.Parent.Parent.Fullpath
FWIW.
 
Upvote 0
Though it would be easier to use:
Code:
msgbox AAA.Address(external:=true)
rather than fannying about with multiple parent properties! :)
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top