FileName = App.Path & "\" & FileName ' Set the object variable to refer to the file you want to use. Dim excelObj As Object Set excelObj = GetObject(FileName) ' Show Excel through its Application property. excelObj.Application.Visible = True ' Show the window containing the file. Dim winCount As Integer 'winCount = excelObj.Parent.Windows.Count() 'excelObj.Parent.Windows(winCount).Visible = True Set connectXls = excelObj.WORKSHEETS(ShtName) Set excelObj = Nothing End Function
'' Public Function funOpenExcelFile(ByRef xlsApp As Excel.Application, _ ByRef xlsWork As Excel.Workbook, _ ByRef xlsSheet As Excel.Worksheet, _ ByVal strExcelFile As String, _ ByVal strSheetName As String, _ ByVal strPWD As String, _
dim a as string,b as string£¬c as string a="¹¤³Ì±àºÅ,µ¥Î»¹¤³ÌÃû³Æ,·Ö²¿¹¤³Ì±àºÅ" b="µ¥Î»¹¤³ÌÃû³Æ" c="µ¥Î»" Ôõô²ÅÄÜÅжϳöa×Ö·û´®ÖдæÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®