I have coded a small vba Macro in the workbook named Destination.xlsx, and it is as follows:
Sub GetDataArea()
Dim rng As Range
Set rng = Application.InputBox("Select the cells.", Type:=8)
End Sub
I have selected InputBox Type:=8 because I want users to select some cells and then I want to copy the cell reference or address of those selected cells. The problem here is that the Macro is coded in Destination.xlsx, I want the user to select cells in Source.xlsx (it can be any workbook of users' choice), and copy the cell reference or cell address of Source.xlsx. It looks like the screenshot attached here >InputBox
Basically, I want to copy the text [Source.xlsx]SheetA!$A$1:$C$10 from my Inputbox. I am not sure how do I get this. I tried rng.address but it returns only $A$1:$C$10 While need complete reference as [Source.xlsx]SheetA!$A$1:$C$10
Pls help...