°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·ҳ£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Excel_word_ppt_ʹÓü¼ÇÉ´óÈ«£¨ÍêÈ«°æ£©¡¡¡¡
Selection¡£Style¡¡=¡¡¡¨Percent¡¨¡¡µ±Ç°µ¥Ôª¸ñ×ÖÌåΪ´ÖÌå¡¡Selection¡£Font¡£Bold¡¡=¡¡True¡¡µ±Ç°µ¥¡¡
Ôª¸ñ×ÖÌåΪбÌå¡¡Selection¡£Font¡£Italic¡¡=¡¡True¡¡µ±Ç°µ¥Ôª¸ñ×ÖÌåΪËÎÌå20ºÅ×Ö¡¡With¡¡¡¡
Selection¡£Font¡¡¡£Name¡¡=¡¡¡¨ËÎÌ塨¡¡¡£Size¡¡=¡¡20¡¡End¡¡With¡¡With¡¡Óï¾ä¡¡With¡¡¶ÔÏó¡¡¡£ÃèÊö¡¡End¡¡With¡¡¡¡
ÈÃÄãµÄ»úÆ÷·¢³öÏìÉù¡¡¡¡BEEP¡¡¡¡Çå³ýµ¥Ôª¸ñÖÐËùÓÐÎÄ×Ö¡¢Åú×¢¡¢¸ñʽ¡¢ËùÓеĶ«Î÷£¡¡¡¡¡
ActiveCell¡£Clear¡¡²âÊÔÑ¡Ôñ״̬µÄµ¥Ôª¸ñµÄÐÐÊý¡¡MsgBox¡¡Selection¡£Rows¡£Count¡¡²âÊÔÑ¡Ôñ¡¡
״̬µÄµ¥Ôª¸ñµÄÁÐÊý¡¡MsgBox¡¡Selection¡£Columns¡£Count¡¡²âÊÔÑ¡Ôñ״̬µÄµ¥Ôª¸ñµÄµØÖ·¡¡¡¡
Selection¡£Address¡¡ÈÃËùÓеĴíÎó²»ÔÙ·¢Éú¡¡ON¡¡ERROR¡¡RESUME¡¡NEXT¡¡²úÉú´íÎóʱÈôíÎóתµ½Áí¡¡
Ò»¸öµØ·½¡¡on¡¡error¡¡goto¡¡l¡¡'code¡¡l£º¡¡'code¡¡É¾³ýÒ»¸öÎļþ¡¡kill¡¡¡¨c£º1¡£txt¡¨¡¡¶¨ÖÆ×Ô¼ºµÄ×´¡¡
̬¡¡À¸¡¡¡¡¡¡Application¡£StatusBar¡¡¡¡=¡¡¡¡¡¨¡¡ÏÖ¡¡ÔÚ¡¡Ê±¡¡¿Ì¡¡£º¡¡¡¡¡¨¡¡¡¡&¡¡¡¡Time¡¡¡¡»Ö¡¡¸´¡¡×Ô¡¡¼º¡¡µÄ¡¡×´¡¡Ì¬¡¡À¸¡¡¡¡
Application¡£StatusBar¡¡=¡¡false¡¡ÔÚÔËÐÐÆÚÖ´ÐÐÒ»¸öºê¡¡Application¡£Run¡¡macro£º=¡¨text¡¨¡¡¹ö¡¡
¶¯´°¿Úµ½a1µÄλÖá¡ActiveWindow¡£ScrollRow¡¡=¡¡1¡¡ActiveWindow¡£ScrollColumn¡¡=¡¡1¡¡¶¨ÖÆϵͳ¡¡
ÈÕÆÚ¡¡Dim¡¡MyDate£»¡¡MyDay¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡XXXVII¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Page¡¡38¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Excel_word_ppt_ʹÓü¼ÇÉ´óÈ«£¨ÍêÈ«°æ£©¡¡¡¡
MyDate¡¡=¡¡#12/12/69#¡¡MyDay¡¡=¡¡Day£¨MyDate£©¡¡½ñÌìµÄÄêÏÞ¡¡Dim¡¡MyDate£»¡¡MyYear¡¡MyDate¡¡=¡¡Date¡¡¡¡
MyYear¡¡=¡¡Year£¨MyDate£©¡¡MsgBox¡¡MyYear¡¡²úÉúÒ»¸öinputbox¡¡InputBox¡¡£¨¡¨Enter¡¡number¡¡¡¡
of¡¡¡¡months¡¡¡¡to¡¡¡¡add¡¨£©¡¡¡¡µÃ¡¡µ½¡¡Ò»¡¡¸ö¡¡ÎÄ¡¡¼þ¡¡Ãû¡¡£º¡¡¡¡¡¡Dim¡¡¡¡kk¡¡¡¡As¡¡¡¡String¡¡¡¡kk¡¡¡¡=¡¡¡¡
Application¡£GetOpenFilename£¨¡¨EXCEL¡¡£¨*¡£XLS£©£»¡¡*¡£XLS¡¨£»¡¡Title£º=¡¨Ìáʾ£ºÇë´ò¿ªÒ»¸öEXCEL¡¡
Îļþ£º¡¨£©¡¡msgbox¡¡kk¡¡´ò¿ªzoomÏÔʾ±ÈÀý¶Ô»°¿ò¡¡Application¡£Dialogs£¨xlDialogZoom£©¡£Show¡¡¼¤¡¡
»î×ÖÌå¶Ô»°¿ò¡¡Application¡£Dialogs£¨xlDialogActiveCellFont£©¡£Show¡¡´ò¿ªÁí´æ¶Ô»°¿ò¡¡Dim¡¡¡¡
kk¡¡¡¡As¡¡¡¡String¡¡¡¡kk¡¡¡¡=¡¡¡¡Application¡£GetSaveAsFilename£¨¡¨excel¡¡¡¡£¨*¡£xls£©£»¡¡¡¡*¡£xls¡¨£©¡¡¡¡
Workbooks¡£Open¡¡kk¡¡´Ë¶Î´úÂëÑ°ÕÒ×Ö·û´®ÖÐÌض¨×Ö·ûµÄλÖã¬ÐèÒª½¨Á¢Ò»¸ö´°Ì壬²¢ÔÚ´°ÌåÖУ¬¡¡
·ÅÈëTEXTBOX1£»TEXTBOX2ºÍTEXTBOX3£¨3¸öÎı¾¿ò£©¼°MANDBUTTON1£¨°´Å¥£©¡¡Private¡¡Sub¡¡¡¡
mandButton1_Click£¨£©¡¡a¡¡=¡¡TextBox1¡£Text¡¡b¡¡=¡¡TextBox2¡£Text¡¡aa¡¡=¡¡Len£¨a£©¡¡i¡¡=¡¡1¡¡Dim¡¡YY¡¡¡¡
As¡¡String¡¡If¡¡b¡¡=¡¡¡¨¡¨¡¡Then¡¡Exit¡¡Sub¡¡Do¡¡If¡¡InStr£¨i£»¡¡a£»¡¡b£»¡¡vbTextpare£©¡¡=¡¡0¡¡Then¡¡Exit¡¡¡¡
Do¡¡kk¡¡=¡¡InStr£¨i£»¡¡a£»¡¡b£»¡¡vbTextpare£©¡¡YY¡¡=¡¡YY¡¡&¡¡CStr£¨kk£©¡¡&¡¡¡¨/¡¨¡¡i¡¡=¡¡kk¡¡£«¡¡1¡¡Loop¡¡While¡¡¡¡
aa¡¡¡·=¡¡i¡¡TextBox3¡£Text¡¡=¡¡YY¡¡End¡¡Sub¡¡ActiveX¿Ø¼þÔÚExcel97ÖеÄÔËÓá¡Excel97ÔÚ¹¤×÷±í»ò¡¡
ͼ±íÉÏ¿ÉʹÓÃActiveX¿Ø¼þ£¬¸ù¾ÝÎÒʹÓõÄÌå»á£¬ÔÚ¹¤×÷ÉÏ´¦Àí¿Ø¼þʱ£¬±ØÐë×¢ÒâºÍÁ˽âÈçÏ¡¡
ÊÂÏ¡¡¡¡£¨Ò»£©ÓÃExcel5¡£0/95¹¤×÷²¾Îļþ¸ñʽ±£´æExcel97¹¤×÷²¾Ê±£¬½«Ñ¡ÔñActiveX¿Ø¼þÐÅÏ¢¡£¡¡
µ±Óû§Í¨¹ýË«»÷Êó±êÀ´±à¼ÄÚǶÔÚÆäËüÓ¦ÓóÌÐòÎĵµÖеÄExcel97¹¤×÷²¾Ê±£¬¸Ã¹¤×÷²¾ÉϵĿء¡
¼þ½«²»»áÕý³£¹¤×÷¡£Èç¹ûÓû§ÊÇͨ¹ýÓÃÓÒ¼üµ¥»÷¹¤×÷²¾£¬È»ºóÑ¡Öпì½Ý²Ëµ¥ÉϵĨD´ò¿ª¡¬¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡XXXVIII¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Page¡¡39¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Excel_word_ppt_ʹÓü¼ÇÉ´óÈ«£¨ÍêÈ«°æ£©¡¡¡¡
ÃüÁîÀ´±à¼¹¤×÷²¾µÄ»°£¬¹¤×÷²¾ÉϵĿؼþ¾ÍÄÜÕý³£¹¤×÷ÁË¡£¡¡¡¡£¨¶þ£©µ±ActiveX¿Ø¼þ´¦ÓÚ¼¤»î״̬¡¡
ʱ£¬½«½ûÓÃijЩMicrosoftExcelVisualBasic·½·¨ºÍÊôÐÔ¡£ÀýÈ磬µ±Ä³Ò»¿Ø¼þ¼¤»îʱ£¬¾Í²»ÄÜ¡¡
ʹÓÃSort·½·¨£¬¹ÊÏÂÊö°´Å¥µ¥»÷ʼþ´¦Àí¹ý³ÌÖеĴúÂ뽫ʧ°Ü¡¡£¨ÒòΪÓû§µ¥»÷°´Å¥ºó£¬¸Ã°´Å¥¡¡
¾Í¡¡´¦¡¡ÓÚ¡¡¼¤¡¡»î¡¡×´¡¡Ì¬¡¡£©¡¡¡£¡¡¡¡¡¡PrivateSubmandButton1¡¡¡¡¡¡¡¡Click¡¡¡¡Range£¨¡¡¡¡a1£ºa10¡¡¡¡£©¡¡¡¡
SortKey1£º=Range£¨a1£©¡¡EndSub¡¡½â¾ö°ì·¨ÊÇͨ¹ýÑ¡¼¤»î¹¤×÷±íÉÏÆäËüÔªËصķ½·¨À´ÈƹýÕâ¡¡
ÖÖÎÊÌâ¡£ÀýÈ磬¿ÉÓÃÏÂÁдúÂë¶Ôµ¥Ôª¸ñÇøÓòÅÅÐò£º¡¡PrivateSubmandButton1¡¡¡¡Click¡¡¡¡
Range£¨a1£©¡¡¡¡Activate¡¡Range£¨a1£ºa10£©¡¡¡¡SortKey1£º=Range£¨a1£©¡¡mandButton1¡¡¡¡
Activate¡¡End¡¡Sub¡¡£¨Èý£©ÔÚMicrosoftExcel¡¡ÖУ¬ÓÃOLEObjects¼¯ºÏÖеÄOLEObject¶ÔÏó´ú±í¡¡
ActiveX¿Ø¼þ¡£Èç¹ûÒªÓñà³ÌµÄ·½Ê½Ïò¹¤×÷±íÌí¼ÓActiveX¿Ø¼þ£¬¿ÉÓÃOLEObjects¼¯ºÏµÄAdd·½¡¡
·¨¡£ÀýÈçÏòµÚÒ»ÕŹ¤×÷±íÌí¼ÓÃüÁî°´Å¥¡£¡¡Worksheets£¨1£©¡¡¡¡OLEObjects¡¡¡¡Add¡¡Forms¡¡¡¡
mandButton¡¡¡¡1£¬_¡¡Left£º=10£»Top£º=10£»Height£º=20£»Width£º=100¡¡ÒòΪActiveX¿Ø¼þÒ²¿ÉÓá¡
OLEObjects¼¯ºÏÖеÄOLEObject¶ÔÏó´ú±í£¬ËùÒÔÒ²¿ÉÓøü¯ºÏÖеĶÔÏóÀ´ÉèÖÿؼþµÄÊôÐÔ¡£Àý¡¡
ÈçÒªÉèÖÿؼþ¨DmandBotton1¡¬¡¡µÄ¨D¡¡×ó±ßλÖᬡ¡ÊôÐÔ¡£¡¡Worksheets£¨1£©¡¡¡¡OLEObjects£¨¡¡¡¡
mandButton1¡¡£©¡¡¡¡Left=10¡¡ÄÇЩ²»ÊôÓÚOLEObject¶ÔÏóÊôÐԵĿؼþÊôÐÔ£¬¿Éͨ¹ýÓÉObject¡¡
ÊôÐÔ·µ»ØµÄʵ¼Ê¿Ø¼þ¶ÔÏóÀ´ÉèÖá£ÀýÈçÒªÉèÖÿؼþ¨DmandButton1¡¬¡¡µÄ±êÌâ¡£¡¡Worksheets£¨1£©¡¡¡¡
OLEObjects£¨¡¡mandButton1¡¡£©¡¡¡¡¡¡Object¡¡¡¡Caption=¡¡runme¡¡¡¡ÒòΪËùÓеÄOLE¶ÔÏóÒ²ÊÇ¡¡
Shapes¼¯ºÏµÄ³ÉÔ±£¬ËùÒÔÒ²¿ÉÓøü¯ºÏÉèÖÃÈô¸É¿Ø¼þµÄÊôÐÔ¡£ÀýÈçÒª¶ÔÆëµÚÒ»ÕŹ¤×÷±íÉÏËùÓС¡
¿Ø¼þµÄ×ó±ß¿ò¡£¡¡ForEachsInWorksheets£¨1£©¡¡¡¡Shapes¡¡Ifs¡¡¡¡Type=msoOLEControlObjectThens¡¡¡¡
Left=10¡¡Next¡¡Çë×¢Ò⣬µ±ÔڿؼþËùÔÚ¹¤×÷±íµÄÀàÄ£¿éÖ®ÍâʹÓÿؼþµÄÃû³Æʱ£¬±ØÐëÓù¤×÷±í¡¡
µÄÃû³ÆÏÞ¶¨¸Ã¿Ø¼þµÄÃû³Æ¡£ÔÚ¹¤×÷±íÉÏActiveX¿Ø¼þµÄʼþ´¦Àí¹ý³ÌÖУ¬Me¹Ø¼ü×ÖËùÖ¸ÏòµÄÊÇ¡¡
¹¤×÷±í£¬¶ø·Ç¿Ø¼þ¡¡65¡¢ÔÚExcelÖÐÀûÓÃVBA´´½¨¶à¼¶Ñ¡µ¥¡¡ExcelÊÇÎÒÃdz£Óõı¨±í´¦ÀíÈí¼þÖ®¡¡
Ò»£¬¶ÔÓÚ´ó¶àÊýÈËÀ´ËµÖ»ÊÇʹÓÃËü½øÐдòÓ¡±¨±í£¬Ã»ÓÐ×¢ÒâÆäËû¹¦ÄÜ£¬ÆäʵÀûÓÃExcelÄÚǶµÄ¡¡¡¡
VBA¡¡ÓïÑÔÍêÈ«¿ÉÒÔ¿ìËÙ¿ª·¢³ö×Ô¼ºÆóÒµµÄÓ¦ÓÃϵͳÀ´£¬¶øÇÒÓ¦ÓÃϵͳ½çÃæÓëÆäËüרҵ±à³ÌÓïÑÔ¡¡
Ï൱ÏàËÆ¡£ÏÂÃæ±ÊÕß¼òµ¥Í¨¹ýÒ»¸öʵÀý˵Ã÷ÈçºÎÀûÓÃVBA´´½¨¶à¼¶Ñ¡µ¥¡£¡¡Ê×ÏÈ£¬ÎÒÃǶÔExcel¡¡
ÖÐÁ½¸öÖØÒªµÄÄÚÖú¯Êýauto_open£¨£©¡¡ºÍ¡¡auto_close£¨£©×÷Ò»¼òµ¥ËµÃ÷¡£¡¡auto_open£¨£©¡¡£ºÔÚ´ò¿ª¡¡
¹¤×÷²¾Ê±ÏµÍ³½«×Ô¶¯Ö´Ðиú¯Êý£¬Òò´ËÎÒÃÇ¿ÉÒÔÔڸú¯ÊýÖе÷ÓÃ×Ô¼ºÓ¦ÓóÌÐòµÄÑ¡µ¥º¯ÊýÒÔ¼°¡¡
ÆäËüÐèÒª³õʼ»¯ÉèÖõĺ¯Êý¼°ºêÓï¾ä£»¡¡auto_close£¨£©£ºÔڹرչ¤×÷²¾Ê±ÏµÍ³½«×Ô¶¯Ö´Ðиú¯¡¡
Êý¡£ËùÒÔÎÒÃÇÐèÒªÔڸú¯ÊýÖзÅÖÃɾ³ýÓû§×Ô¶¨ÒåÑ¡µ¥Óï¾ä£¬·ñÔòÖ»ÓÐÍ˳öExcel²ÅÄָܻ´¡¡
EXCELµÄϵͳѡµ¥¡£¡¡ÔÚÒÔÏÂÓï¾äÖУ¬ÎÒÃǶ¨ÒåÁËÑ¡µ¥ÉèÖú¯Êý¡¡OpenMyMenu£¨£©£¬ÓÃÓÚÉèÖö༶¡¡
Ñ¡µ¥£¬ÆäËûÓйØ˵Ã÷¼û³ÌÐòÄÚ×¢ÊÍ£¬Ïêϸ´úÂëÈçÏ£º¡¡Sub¡¡OpenMyMenu£¨£©¡¡£«×Ô¶¨Òå¶à¼¶Ñ¡µ¥º¯¡¡
Êý¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡XXXIX¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Page¡¡40¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Excel_word_ppt_ʹÓü¼ÇÉ´óÈ«£¨ÍêÈ«°æ£©¡¡¡¡
On¡¡Error¡¡Resume¡¡Next¡¡¡¡£«ºöÂÔ´íÎó¡¡¡¡MenuBars£¨¡¨MyMenu¡¨£©¡£Delete¡¡¡¡£«É¾³ý×Ô¶¨ÒåÑ¡µ¥¡¡¡¡
MenuBars¡£Add¡¡¡¡¡¡£¨¡¨MyMenu¡¨£©¡¡¡¡£«¡¡¡¡×Ô¡¡¡¡¶¨¡¡¡¡Òå¡¡¡¡Ñ¡¡¡¡¡µ¥¡¡¡¡Ïî¡¡¡¡¡¡¡¡¡¡Sheets£¨¡¨sheet1¡¨£©¡£Select¡¡¡¡
MenuBars£¨¡¨MyMenu¡¨£©¡£Menus¡£Add¡¡Caption£º=¡¨½ðÈÚ¡¨¡¡£«Ôö¼ÓµÚÒ»¸öÑ¡µ¥Ïî¨D½ðÈÚ¡¬¡¡¡¡£«ÒÔÏÂÈý¾ä¡¡
ΪÔÚ¨D½ðÈÚ¡¬Ñ¡µ¥ÏÂÔö¼Ó¨DÒøÐз¨¡¢»õ±ÒÕþ²ßºÍÌõÀý¡¬ÈýÏîÑ¡µ¥Ïî¡¡MenuBars£¨¡¨MyMenu¡¨£©¡£Menus£¨¡¨¡¡
½ð¡¡¡¡ÈÚ¡¡¡¡¡¨£©¡£MenuItems¡£Add¡¡¡¡¡¡Caption£º=¡¨¡¡¡¡Òø¡¡¡¡ÐС¡¡¡·¨¡¡¡¡¡¨£»¡¡¡¡¡¡OnAction£º=¡¨¡¡¡¡Òø¡¡¡¡ÐС¡¡¡·¨¡¡¡¡¡¨¡¡¡¡
MenuBars£¨¡¨MyMenu¡¨£©¡£Menus£¨¡¨½ðÈÚ¡¨£©¡£MenuItems¡£Add¡¡Caption£º=¡¨»õ±ÒÕþ²ß¡¨£»¡¡OnAction£º=¡¨»õ¡¡
±Ò¡¡Õþ¡¡²ß¡¡¡¨¡¡¡¡MenuBars£¨¡¨MyMenu¡¨£©¡£Menus£¨¡¨¡¡½ð¡¡ÈÚ¡¡¡¨£©¡£MenuItems¡£Add¡¡¡¡Caption£º=¡¨¡¡Ìõ¡¡Àý¡¡¡¨£»¡¡¡¡
OnAction£º=¡¨ÌõÀý¡¨¡¡¡¡£«ÒÔÏÂΪ´´½¨È