malleshg24
08-21-2017, 11:59 PM
Hi Team,
To pick a file , I am using below method. wherein user has to paste the file path and run a macro.
Set wbk = Workbooks.Open(Sheet1.Range("B5").Value) ' F:\varsha\Book2.xlsx
I look here to go below option, But I am getting Object Variable or with block variable not set. plz help.:crying::help
Dim filename As String
filename = Application.GetOpenFilename
Dim cell As Range
cell = Application.Sheet1.Range("B5").Value)
cell.Value = filename
Regards,
Mallesh
To pick a file , I am using below method. wherein user has to paste the file path and run a macro.
Set wbk = Workbooks.Open(Sheet1.Range("B5").Value) ' F:\varsha\Book2.xlsx
I look here to go below option, But I am getting Object Variable or with block variable not set. plz help.:crying::help
Dim filename As String
filename = Application.GetOpenFilename
Dim cell As Range
cell = Application.Sheet1.Range("B5").Value)
cell.Value = filename
Regards,
Mallesh