Private Sub Command1_Click() Dim sFile As String With CommonDialog1 .DialogTitle = "open" .CancelError = False .Filter = "EXCELÎļþ(*.xls)|*.xls|ËùÓÐÎļþ (*.*)|*.*" .ShowOpen If Len(.FileName) = 0 Then Exit Sub End If sFile = .FileName End With
Dim mx As Integer
Dim yx
Dim excelApp As Excel.Application Set excelApp = New Excel.Application excelApp.Workbooks.Open FileName:=sFile 'xlApp.Visible = True excelApp.Worksheets(2).Activate mx = excelApp.Cells(9, 5) Text1.Text = mx excelApp.Workbooks.Close excelApp.Quit Set excelApp = Nothing
End Sub¿ÉÒÔ½«µÚÒ»¸ö°´Å¥ÀïµÄ´úÂëд³É×Ô¶¨Ò庯Êý. ÇåÊý¾Ý: excelApp.sheets(2).cells(6,3).clearcontents excelApp.Worksheets(2).Range("C6").Delete ллlsµÄ ÄÇÈç¹ûҪɾ³ý¸ÃÐеÚÁùÁÐÖ®ºóµÄËùÓÐÄÚÈݸÃÔõôдѻ·ÄØ£¿
VBÔõÑù»ñµÃÊó±ê´¦µÄ³¬¼¶Á¬½ÓÄØ£¿ ÔÚWebBrowser¿Ø¼þÖÐÓÐÕâÑùÒ»¸öʼþ:StatusTextChange(index As Integer, ByVal Text As String) ËüµÄText²ÎÊýÕýÊÇÊó±ê´¦µÄ³¬¼¶Á¬½Ó,µ«ÎÊÌâÊÇÈç¹ûÎÒµÄä¯ÀÀÆ÷Õýà ......
dim a as string,b as string£¬c as string a="¹¤³Ì±àºÅ,µ¥Î»¹¤³ÌÃû³Æ,·Ö²¿¹¤³Ì±àºÅ" b="µ¥Î»¹¤³ÌÃû³Æ" c="µ¥Î»" Ôõô²ÅÄÜÅжϳöa×Ö·û´®ÖдæÔÚb×Ö·û´®£¬¶ø²»´æÔÚc×Ö·û´®