ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¯à§_¥uÃö³¬·QÃö±¼ªºEXCELÀÉ´N¦n¡H

[µo°Ý] ¯à§_¥uÃö³¬·QÃö±¼ªºEXCELÀÉ´N¦n¡H

³nÅé¡GEXCEL VBA
ª©¥»¡G2003


¦U¦ì¥ý¶i¡ã¡ã¤j®a¦n

¤p§Ì¦b®Ñ¤W¦³¬Ý¨ì¯àª½±µÃö³¬EXCELªº»yªk

®Ñ¤W¼gApplication.Quit

µ²ªG¤p§Ì´N¨Ì¼Ë®Ñ¸¬Äªªº¼g¶iµ{¦¡¤¤¡Fµ²ªG¤@°õ¦æ«á¡Aªº½T±N·Q­nÃö³¬ªºEXCELµ¹Ãö¤F

¦ýµ{¦¡±N®à­±¨ä¥¦¥¿¶}µÛªºEXCELÀɤ]³£Ãö±¼¤F¡C¡C¡C¡C¡C¡C¡C:'(

°O±o²{¦bªºEXCEL¤£¬O¤w¸g¯à³æ¤@ÀÉ®×°õ¦æ¤F¶Ü¡]´N¬O¤@­ÓÀɮ׶}¤@­ÓEXCEL)¡H¨ºµ{¦¡«ç»ò·|±N©Ò¦³ªºEXCELÀɤ]¤@¨ÖÃö±¼¤F©O¡H

©Ò¥H¤p§Ì·Q½Ð°Ý¥ý¶i­Ì¬O§_¦³¤èªk¡A¯àÅýµ{¦¡¥uÃö³¬·QÃöªº¨º­ÓEXCELÀÉ´N¦n

¦Ó®à­±¤W¨ä¥¦¶}µÛªºEXCELÀÉ«h¤£­n¥h°Ê¨ì¡I

¥H¤W¡A·PÁ¦U¦ì¡I
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

¦^´_ 1# syuan
ActiveWorkbook.Close False                  'Ãö±¼§@¥Î¤¤ªº¬¡­¶Ã¯
Workbooks("¬Y¬Y¬Yxls").Close True          'Ãö±¼«ü©wªº¬¡­¶Ã¯
¤£¦sÀÉ Close False ,  ¦sÀÉ Close true

TOP

¸É¤@­Ó,Ãö±¼·í«e¹BVBAªºEXCEL
Thisworkbook.close false
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

·PÁÂGBKEE»Pkimbal¤G¦ì¥ý¶i¦ìªº¦^ÂÐ

¤p§Ì·Ó¤G¦ì©Ò«ü¥Üªº»yªk³£¸Õ¤F¤@¹M¡Iµo²{³£¥i¦æ¡ã¡ã

¤£¹LWorkbooks("¬Y¬Y¬Yxls").Close True³o¬q»yªk¡AÃö³¬¤F¬¡­¶Ã¯«á¡A¨Ã¤£·|±Nexcelµ¹Ãö³¬¡]´N¬O¯d¤@­ÓªÅ¥Õªºexcel¦b®à­±¡C¡C¡C¡C¡C¡^ ¡ã¡ã«Ü¯S§O¡I

¤£¹L¤p§Ì¦b¸ÕÅçThisworkbook.close false»PActiveWorkbook.Close False®É¡Aµo²{¬¡­¶Ã¯»P¸ÓÀɤ§excel¬OÃö°_¨Ó¤F¡A¦ývbe½s¿è¾¹©|¯d¦b®à­±¤W

©Ò¥H¤p§Ì§ä¨ì³o¬q»yªkApplication.VBE.CommandBars.FindControl(ID:=752).Execute

¥u¬O°õ¦æ«á¡Avbe½s¿è¾¹¤´¯d¦b®à­±¤W..........!

(¤p§Ì¥Ø«e¤´¦b¸Õ§Oªº»yªk!)
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

TOP

¦^´_ 4# syuan
vbe½s¿è¾¹¤´¯d¦b®à­±¤W..........!
Ãö³¬VBEµøµ¡ Application.VBE.MainWindow.Visible = False

ActiveWorkbook.Close False                  
Workbooks("¬Y¬Y¬Yxls").Close True         
thisworkbook.Close True
³o¨Ç³£¬O¬¡­¶Ã¯,©Ò¥HClose(Ãö³¬)ªº¬O¬¡­¶Ã¯,¨Ã¤£·|Ãö³¬Excel³oÀ³¥Îµ{¦¡(³nÅé).
­nÃö³¬Excel³oÀ³¥Îµ{¦¡¨Ï¥Î ->   Application.Quit   
Excel vba ªº Application ´N¬O->Excel
  1. Sub Ex()
  2.     Dim A As New Application
  3.     A.Visible = True
  4. End Sub
½Æ»s¥N½X

TOP

¦^´_  syuan
vbe½s¿è¾¹¤´¯d¦b®à­±¤W..........!
Ãö³¬VBEµøµ¡ Application.VBE.MainWindow.Visible = Fal ...
GBKEE µoªí©ó 2011-5-18 19:57

·PÁÂGBKEE¤j¦^ÂÐ

¡@¡@­ì¨Ó¨º­ÓVBEµLªk³æ¿WÃö±¼¡I¥»¨Ó¤p§Ì·Qªº¬O¨Ï¥ÎªÌ¦pªG¶}¤F§OªºEXCELÀÉ«á¡]AÀÉ¡^¡A¤S¶}¤F¦³¼gÃö±¼¬¡­¶Ã¯ªºµ{¦¡«á¡]BÀÉ¡^¡Aµ²ªG¨Ï¥ÎªÌ±N¦³¼gÃö³¬¬¡­¶Ã¯ªºEXCELÀÉ«á(BÀÉ¡^
·|¦]AÀÉ¥¼Ãö³¬¡A¦Óµo²{®à­±¦h¤F­ÓªÅ¥ÕªºVBE½s¿è¾¹¡A¥i¯à´N·|ı±o«Ü©_©Ç¡I


³o¼Ë´N¦³ÂI¶Ë¸£µ¬¤F¡C¡C¡C¡C¡C¯uªº¨S¿ìªkÃö³¬VBE¶Ü¡H
¤p§ÌÁÙ¬O·Q¸Õ¸Õ¬Ý¡ã¡ã
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

TOP

¦^´_ 6# syuan
³o¼Ë´N¦³ÂI¶Ë¸£µ¬¤F¡C¡C¡C¡C¡C¯uªº¨S¿ìªkÃö³¬VBE¶Ü¡H
Application.VBE.MainWindow.Visible = False ¤£´N¬OÃö³¬VBE

TOP

·PÁÂGBEKK¤jªº«ü¾É

¤p§Ì²´·ú"IJ¥Ø"¤@®É¨S¬Ý¨ì¡A©êºp¡ã¡ã

¤p§Ì«á¨Ó·Q¨ì......©Î³\¥i¥H¤£¥Î¥hºÞ¨º­ÓVBE¡I

¦]¬°¤@¯ë¨Ï¥ÎªÌ·|¥h¶}VBE°_¨Óªº¾÷²v¨Ã¤£¤j¡A©Ò¥H¥i¥H¤£¥Î¥hºÞ¥¦

¸U¤@¤£¤p¤ß³Q¶}°_¨Ó¦Ó¤S¦³¦P¨Æ¦b°Ý¡A¨º§Úª½±µ´N¸ò¹ï¤è»¡¡G¤£¥Î²z¥¦¡Aª½±µÃö±¼´N¦n¡ã¡ã
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

TOP

¦^´_ 8# syuan
¦bµ{¦¡ªº§ÀºÝ¥[¤W     Application.VBE.MainWindow.Visible = False  
¤£´NÃö³¬¤F

TOP

¥»©«³Ì«á¥Ñ syuan ©ó 2011-5-26 11:05 ½s¿è
¦^´_  syuan
¦bµ{¦¡ªº§ÀºÝ¥[¤W     Application.VBE.MainWindow.Visible = False  
¤£´NÃö³¬¤F
GBKEE µoªí©ó 2011-5-24 16:07



·PÁÂGBKEE¥ý¶iªº«ü¾É

  ¤p§Ì·Ó°µ¤§«á¡A¥X²{¤@­Ó¹ï¸Ü®Ø¡I¤º®e¬O"°õ¦æ¶¥¬q¿ù»~¢°¢¯¢¯¢³¡A¹ï©óvisual basic±M®×ªºµ{¦¡¤Æ¦s¨ú¥¼«H¥ô

¤p§Ì¤Wºô¬d¤F¤@¤U¡Aµo²{­n¥h¦w¥þ©Ê¸Ìªº¿ï¶µ¡F¦³­Ó¥s"«H¥ô¦s¨úVisual Basic±M®×"ªº¿ï¶µ¥´¤Ä¡A¥´¤c«á´N¤£·|¥X²{¤W­zªº¹ï¸Ü®Ø¤F¡I

¥u¬O¨º­Ó«H¥ô¦s¨úªº¿ï¶µ¥´¤Ä«á¡Aexcel¬O¤£¬O¹ï©ó©Ò¦³vbaµ{¦¡³£¬OÅܦ¨µL¨¾³Æ¤F©O¡H³o¼Ë¦n¹³¤]®¼¦MÀIªº¡C¡C¡C¡C¡C¡C¡C
¿ú¬O«Ü±I²öªº¡A©Ò¥H·|·Q¿ìªk»E¦b¤@°_¡I

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD