prshnthvn
03-28-2010, 07:22 AM
Hello Everyone,
Can anyone let me know how to close a chosen, opened workbook among all the other opened workbooks?
Actually i am opening a workbook(DATA1.xls) in my macro(calculator.xls) to get the data needed for my calculation. After copying the data from DATA1.xls, i want to close that workbook.
The workbook name can change so i cannot use workbooks(DATA1.xls).close always.
I am using a variable "DATA" while opening that workbook, is there any way to use this to close the workbook?
DATA = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please select a Master list file")
Thanks in advance;
Regards,
Prashanth.
Can anyone let me know how to close a chosen, opened workbook among all the other opened workbooks?
Actually i am opening a workbook(DATA1.xls) in my macro(calculator.xls) to get the data needed for my calculation. After copying the data from DATA1.xls, i want to close that workbook.
The workbook name can change so i cannot use workbooks(DATA1.xls).close always.
I am using a variable "DATA" while opening that workbook, is there any way to use this to close the workbook?
DATA = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please select a Master list file")
Thanks in advance;
Regards,
Prashanth.