niko2008
چهارشنبه 19 آبان 1389, 09:03 صبح
سلام دوستان مشکل این کد اینه که هنگام باز بودن اکسل ERROR میده
Set XLS = CreateObject("Excel.Application")
Set WRK = XLS.Workbooks.Open(Text1.Text, False, True)
Set SHT = WRK.Worksheets(Combo1.List(Combo1.ListIndex))
WRK.Close False
XLS.Quit
'Release variables
Set XLS = Nothing
Set WRK = Nothing
Set SHT = Nothing
VSFlexGrid1.LoadGrid Text1.Text, flexFileExcel, Combo1.Text
مشکل رو چطوری متونیم حل کنیم؟
Set XLS = CreateObject("Excel.Application")
Set WRK = XLS.Workbooks.Open(Text1.Text, False, True)
Set SHT = WRK.Worksheets(Combo1.List(Combo1.ListIndex))
WRK.Close False
XLS.Quit
'Release variables
Set XLS = Nothing
Set WRK = Nothing
Set SHT = Nothing
VSFlexGrid1.LoadGrid Text1.Text, flexFileExcel, Combo1.Text
مشکل رو چطوری متونیم حل کنیم؟