I'm trying to open worksheet by taking value from one cell and concate the desire file name but it shows error : object variable or with block variable not set i'm using following code : where "123.xlsx" is name of workbook that i want to open .
Dim output_path As Workbook dim xlwkbrpt1 as workbook output_path = Application.ActiveWorkbook.ActiveSheet.Range("F14").Value Set xlwkbrpt1 = xlApp.Workbooks.Open(output_path & "\" & "123.xlsx")
output_patha Workbook? Shouldn't it be a string? Also, printoutput_path & "\" & "123.xlsx"just before executing the last statement and see what theOpenmethod is trying to open.xlApp.Workbooks.Openjust before the invocation and append the result to your question.