Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This is a script am using to open excel file within application but it is not working please help to solve this
Sub Close()
set XLApp = CreateObject("Excel.Application")
fname="D:\Jeld-wen-new-requirements\Excels\ZSD008OA.xlsx"
set XLDOC = XLApp.Workbooks.Open(fname)
XLApp.Visible = True
end sub
Check with this settings
Vikas
Instead of path i can use a variable?
yes defile in script
SET vQVFile = 'D:\Jeld-wen-new-requirements\Excels\ZSD008OA.xlsx'; |
Sub Close()
set XLApp = CreateObject("Excel.Application")
set XLDOC = XLApp.Workbooks.Open($(fname))
XLApp.Visible = True
end sub
instead of fname use vQVFile
i just have file name in the variable not entire path
I need to use variable in that file name is stored path is same for all file name changes according to the client selection
Sub Close()
set XLApp = CreateObject("Excel.Application")
fname="D:\Jeld-wen-new-requirements\Excels\$(Variable)"
set XLDOC = XLApp.Workbooks.Open(fname)
XLApp.Visible = True
end sub
Better you take file name in input box assign this to variable and use this variable in macro.
Vikas
Thank you..