VB ¸²¸Ç±£´æexcel ²»ÏìÓ¦
²é¿´Ö¸¶¨excelÎļþÊÇ·ñ´ò¿ª Èç¹û´ò¿ª ±£´æ²¢¹Ø±Õ
³öÏÖµÄÎÊÌâÊÇ£º
Èç¹û´ò¿ªÎļþºóûÓÐÈκÎÐÞ¸Ä ¿ÉÒÔÕý³£²Ù×÷
Ò»µ©ÓÐÐÞ¸Ä ¾Í»á³öÏÖ²»ÏìÓ¦ µ«ÊÇÔÚexcelÀïÈÎÒâµØ·½µãÁ½ÏÂÊó±ê ¾ÍÓÖ»áÏìÓ¦
Õâ¸öÊǿ細ÌåµÄ²Ù×÷
Èç¹ûÊÇÒ»¸ö´°Ìå ͬÑùûÓÐÈκÎÎÊÌâ Çë½Ì
numÊǸö×Ö·û´® ÎļþÃû×ÖµÄÒ»²¿·Ö
If IsFileOpened(App.Path & "\²Ù×÷Ìâ\" & num & "±í¸ñ.xls") Then
Form6.excel.workbooks("" & num & "±í¸ñ.xls").Save
Form6.excel.workbooks("" & num & "±í¸ñ.xls").Close
Application.DisplayAlerts = False
Form6.excel.Quit
Set Form6.workbooks = Nothing
Set Form6.excel = Nothing
End If
ÏÂÃæÊÇÅжÏÎļþ¹Ø±ÕµÄº¯Êý
Function WordDocIsOpen(ByVal strDocName As String) As Boolean
Dim objWordApp As Object
Dim objWordDoc As Object
On Error Resume Next '´Ë¾ä²»ÄÜÉÙ
strDocName = UCase(strDocName)
Set objWordApp = GetObject(, "Word.Application")
For Each objWordDoc In objWordApp.documents
If UCase(objWordDoc.FullName) = strDocName Then
WordDocIsOpen = True
Ïà¹ØÎÊ´ð£º
ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿
1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖÐµÄ ......
ÌâÄ¿ÃèÊöÓ¦¸Ã²»ÊǺÜ׼ȷ¡£
ÏÖ×´ÊÇ£º¼ÙÈçÒ»¸öÎı¾Îļþ¹²100ÐУ¬ÄÇôÎÒÑ»·´ÎÊý×î´ó¾ÍÊÇ100×100=10000Ï£¬»¨·Ñʱ¼ä·Ç³£¶à£¬ÇëÎÊÓÐûÓа취Äܹ»Ìá¸ß¶ÔÎı¾ÎļþµÄÑ»··ÃÎÊËÙ¶È¡£·ÇÊý¾Ý¿â¼¼Êõ¡£
ÄãҪѻ·×öʲô£ ......
ÓÃVBÔõôֻÕë¶Ôwindows×Ô´øµÄÎļþµÄÓÒ¼üÌí¼Ó²Ëµ¥ È磨.txt .doc)
Õâ¸öÊÇÖ»Õë¶ÔÒÔÕâÁ½¸öΪÀ©Õ¹ÃûµÄÎļþ²Ù×÷
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\txtfile\shell\[Ëæ±ãÆðÃû]\command]
@= ......
¾ÍÊÇÉè¼ÆÒ»¸ö¼ÆËã»úÄ£Ä⿼ÊÔϵͳ£¬´øÓÐѧÉúºÍ¹ÜÀíÔ±£¬ËùÒԵǼ´°ÌåºÍÖ÷´°ÌåÏë·Ö¿ª£¬µÇ½ѧÉúµÄÏÔʾѧÉúµÄÖ÷´°Ì壬µÇ½¹ÜÀíÔ±ÏÔʾ¹ÜÀíÖ÷´°Ì壬ÎÒÖ»»áÒ»¸ö´°ÌåÓÃÒ»¶Ñ¿Ø¼þ£¬ÏÖÔÚÏíÓжà¸öÖ÷´°Ì壬²»ÖªµÀÔõô×ö£¬Ï£ÍûÇë´ó ......