¼ÐÃD:
EXCEL 2007¥Î¥¨¶°¨Ó½Æ»sWEB¶×¤Jªº¸ê®Æ¡Aµo²{©Ò¦³¸ê®Æ³£©M²Ä¤@µ§¬Û¦P?
[¥´¦L¥»¶]
§@ªÌ:
h12960
®É¶¡:
2014-12-28 15:48
¼ÐÃD:
EXCEL 2007¥Î¥¨¶°¨Ó½Æ»sWEB¶×¤Jªº¸ê®Æ¡Aµo²{©Ò¦³¸ê®Æ³£©M²Ä¤@µ§¬Û¦P?
¦U¦ì«e½ú¤j¤j±z̦n:
¤p§Ì²Ä¤@¦¸¶i¯¸µo¨¥,¦³¤£¿í¦u³W©wªºµo¨¥ÁٽЦU¦ì¤j¤j«ü±Ð,ÁÂÁÂ.
¤p§Ìè¦b¾ÇEXCEL VBA,¦b¹Lµ{µo¥Í¤@Ó°ÝÃD,·Q½Ð¦U¦ì¤j¤jÀ°¦£¤p§Ì¸Ñ¨M.(§Ú¬O¥ÎEXCEL 2007)
§Ú¦³¤@ÓEXCELÀɮ׬O±qWEB¥~³¡¶×¤J¸ê®Æ,¦ý¦]¸ê®Æµ§¼Æ«Ü¦h,©Ò¥H§Ú´N¥Î¥¨¶°FOR.......NEXT°j°é,
·Q»¡±N¶×¤Jªº¨C¤@µ§¸ê®Æ¦A½Æ»s¨ì¥t¤@¤u§@ªí¨Ó§@¦¨¸ê®Æ®w¤§Ãþªº°O¿ý,¦ý«oµo²{¥¨¶°ªºµ{§Ç¶]§¹¤F,
¦ý¶×¤Jªº¸ê®Æ³t«×¸ò¤£¤W(§Y¨ä¹ê¶×¤Jªºµ{§Ç¸ò¥»ÁÙ¨S¶]§¹,³£ÁÙ¦b¶×¤J.),¥¨¶°´N¤w¸g±N©Ò¦³ªº½Æ»sµ{§Ç³£¶]§¹¤F,
©Ò¥H°£²Ä¤@µ§¦³¸ê®Æ¥~,²Ä¤Gµ§¤§«áªº¸ê®Æ³£©M²Ä¤@µ§ªº§¹¥þ¤@¼Ë,
½Ð°Ý¦U¦ì¤j¤j:EXCEL¥¨¶°n¦p¦ó¤~¯à¦b¥~³¡¸ê®Æ¶×¤J§¹²¦«á¦A°õ¦æ½Æ»sªºµ{§Ç?
¥i¥H½Ð¦U¦ì«e½ú¤j¤j¤£§[«ü±Ð¶Ü?
ÁÂÁÂ!!
§@ªÌ:
luhpro
®É¶¡:
2014-12-29 00:32
¦^´_
1#
h12960
¥i°Ñ¬Ý³o½g:
½Ð°Ý³oÓºô¶¦p¦ó¥ÎWEB¬d¸ß¿é¤Jexcel
ªº 8#
¨ä¤¤ªº¸Ñ¨M¤è®×¸Õ¸Õ:
Application.Wait (Time + TimeValue("0:00:03")) '¨Ìºô¶¤U¸ü³t«×½Õ¾ãµ¥«Ý¬í¼Æ
§@ªÌ:
GBKEE
®É¶¡:
2014-12-29 07:48
¦^´_
1#
h12960
¦ý¶×¤Jªº¸ê®Æ³t«×¸ò¤£¤W(§Y¨ä¹ê¶×¤Jªºµ{§Ç¸ò¥»ÁÙ¨S¶]§¹,³£ÁÙ¦b¶×¤J.),¥¨¶°´N¤w¸g±N©Ò¦³ªº½Æ»sµ{§Ç³£¶]§¹¤F,
Dim q As QueryTable
q.Refresh False
'¹õ«á§ó·s¡A«h¶È·í©Ò¦³¸ê®Æ³£Åª¨ú¦Ü¤u§@ªí«á¡A¤~¶Ç¦^¹ïµ{§Çªº±±¨î
½Æ»s¥N½X
Refresh ¤èªk
½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w®M¥Î¦Ü ListObject ª«¥ó®É¥Î Refresh ¤èªk¡C
±q°õ¦æ Microsoft Windows SharePoint Services ªº¦øªA¾¹¤WÂ^¨ú²M³æ¥Ø«eªº¸ê®Æ©Mµ²ºc´yz¡C¦¹¤èªk¶È¥i»P¤w³sµ²¨ì SharePoint ºô¯¸ªº²M³æ¤@°_¨Ï¥Î¡C¦pªG¸Ó SharePoint ºô¯¸µLªk¨Ï¥Î¡A«h©I¥s¦¹¤èªk±N·|¶Ç¦^¿ù»~¡C
expression.Refresh()
expression ¥²¿ï¡C¸Ó¹Bºâ¦¡·|¶Ç¦^ ListObject ª«¥ó¡C
³Æµù
©I¥s Refresh ¤èªk¤£·|½T»{ Excel ¬¡¶Ã¯²M³æ¤¤ªºÅܧó¡C¥B¦b©I¥s Refresh ¤èªk®É¡A·|©ñ±ó Excel ²M³æ¤¤¥¼½T»{ªºÅܧó¡CYnÁקK¿ò¥¢¥ô¦ó¥¼½T»{ªºÅܧó¡A¥i¦b©I¥s Refresh ¤èªk«e¡A¥ý©I¥s ListObject ª«¥óªº UpdateChanges ¤èªk¡C
®M¥Î¦Ü QueryTable ª«¥ó®É¥Î Refresh ¤èªk¡C
§ó·s¥~³¡¸ê®Æ½d³ò (QueryTable)¡CBoolean¡C
expression.Refresh(BackgroundQuery)
expression ¥²¿ï¡C¸Ó¹Bºâ¦¡·|¶Ç¦^ QueryTable ª«¥ó¡C
BackgroundQuery ¿ï¾Ü©Êªº Variant¡C¶È»P°ò©ó SQL ¬d¸ßµ²ªGªº QueryTable ¤@°_¨Ï¥Î¡CY¬° True¡A«h¦b§¹¦¨¸ê®Æ®w³s½u¨Ã°e¥X¬d¸ß«á¡A¥ß¨è¶Ç¦^¹ïµ{§Çªº±±¨î¡CQueryTable ¬O¦b¹õ«á§ó·s¡CY¬° False¡A«h¶È·í©Ò¦³¸ê®Æ³£Åª¨ú¦Ü¤u§@ªí«á¡A¤~¶Ç¦^¹ïµ{§Çªº±±¨î¡C¦pªG¤£«ü©w¦¹¤Þ¼Æ¡A«h¥Ñ BackgroundQuery Äݩʪº³]©w¨Ó¨M©w¬d¸ß¼Ò¦¡¡C
½Æ»s¥N½X
§@ªÌ:
h12960
®É¶¡:
2014-12-31 09:14
·PÁÂluhpro¤j¤j¤ÎGBKEE¤j¤jªº¦^ÂÐ:
1.luhpro¤j¤j©Ò´£¨Ñªº¤èªk§Ú¦³¸Õ¸Õ¬Ý,¦ý¦n¹³ÁÙ¬O¨S¦³§ïµ½,§Ú¤§«e¤]¬O·Q»¡¥Î³o¼Ëªº¤èªk¨Ó¥Î,¦ý«o¤£ª¾¹D«ü¥Oªº¥Îªk,«Ü°ª¿³luhpro´£¨Ñ,Åý§Ú¤]¾Ç¨ì¤F¤@¶µ«ü¥Oªº¥Îªk,ÁÂÁÂluhpro¤j¤j.
2.GBKEE¤j¤j´£¨Ñªº¤èªk,¦]¬°§Ú¤~豵IJVBA¤£¤[,¥\¤O¤£°÷,¦Ñ¹ê»¡§Ú¯uªºÁ٬ݤ£À´,¥i¥H½Ð°Ý¤@¤UGBKEE¤j¤j±z»¡¦³½d¨Ò,½d¨Ò¥h¨º¥i¥H¬Ý±o¨ì,¥i¥H§i¶D§Ú¶Ü?
¦b³oùØ·PÁ¤G¦ì¤j¤jªÖÀ°¦£§Ú¦^µª§Úªº°ÝÃD,Åý§Ú¥i¥H¾Ç¨ì·sªºªF¦è,¯uªº«Ü·PÁÂ
§@ªÌ:
h12960
®É¶¡:
2014-12-31 09:17
¦^´_
2#
luhpro
.luhpro¤j¤j©Ò´£¨Ñªº¤èªk§Ú¦³¸Õ¸Õ¬Ý,¦ý¦n¹³ÁÙ¬O¨S¦³§ïµ½,§Ú¤§«e¤]¬O·Q»¡¥Î³o¼Ëªº¤èªk¨Ó¥Î,¦ý«o¤£ª¾¹D«ü¥Oªº¥Îªk,«Ü°ª¿³luhpro´£¨Ñ,Åý§Ú¤]¾Ç¨ì¤F¤@¶µ«ü¥Oªº¥Îªk,ÁÂÁÂluhpro¤j¤j.
§@ªÌ:
h12960
®É¶¡:
2014-12-31 09:20
¦^´_
3#
GBKEE
GBKEE¤j¤j´£¨Ñªº¤èªk,¦]¬°§Ú¤~豵IJVBA¤£¤[,¥\¤O¤£°÷,¦Ñ¹ê»¡§Ú¯uªºÁ٬ݤ£À´,¥i¥H½Ð°Ý¤@¤UGBKEE¤j¤j±z»¡¦³½d¨Ò,½d¨Ò¥h¨º¥i¥H¬Ý±o¨ì,¥i¥H§i¶D§Ú¶Ü?
©êºp¦]¬°§Ú²Ä¤@¦¸¨Ï¥Î°Q½×°Ï,¤£ª¾¹Dn«ç»ò¦^ÂÐ,¦]è¤~¦bº¶¦³¬Ý¨ì»¡n«ö¦^ÂÐ,¦^ÂЪº¤H¤~·|¦¬¨ì³qª¾,©Ò¥H§Ú¦AÓ§O«ö¤F¦^ÂÐ,¤£ª¾¹D³o¼Ë¹ï¤£¹ï,½Ð¦U¦ì¤j¤j«ü±Ð,ÁÂÁÂ!!
§@ªÌ:
h12960
®É¶¡:
2014-12-31 10:28
½Ð°Ý¤j¤j,¹³§Ú©Ò´£°ÝªºÀÉ®×,¨ä¹ê¬Oºô¸ô¤W¬Y¤j¤j©Ò´£¨Ñªº,¬O¼g¦nªºVBA,§Ú¥u¬On¨ä¤¤¬Y¨Ç¸ê¥Î¦Ó¥Î¥[¤F²³æªºFOR .........NEXT°j°é«ü¥O±N¨ä½Æ»s¨ì¥t¤@¤u§@ªí¤Wn¨Ó¾ã²z.¦Ó¹J¨ì¤F³oÓ°ÝÃD,¥»·Q»¡±N¸ÓÀɮפW¶Çªþ¥ó,³o¼Ë¤]³\¦U¦ì¤j¤jÌ·|¤ñ¸û²M·¡§Ú©Ònªíµªªº¤º®e¦ý©ÈìµÛ§@¤£°ª¿³§Ú¾Õ¦Û¤½§G¨äÀÉ®×,³o¼Ë§Ú¥i¥H¤W¶Ç¸ÓÀɮ׶Ü?ÁÙ¬O¥i¥HÓ§Omailµ¹¤j¤j¥H¤è«K°Q½×©O?
§@ªÌ:
h12960
®É¶¡:
2015-1-1 16:01
¦^´_
7#
h12960
§@ªÌ:
h12960
®É¶¡:
2015-1-24 21:42
¦^´_
3#
GBKEE
·PÁÂGB¤j¤j¡G
¨ì²{¦b¤~µy¬°§ËÀ´GB¤j¤j©Òpostªº8~13ÂI¤¤©Òzªº¤º®e¡A§YTrue¤ÎFalseªº®t§O¡A¯uªº¬O§Ú©Ò»Ýnªº¡A¯u¬O«áª¾«áı¡AÁÂÁ±zGB¤j¤j¡C
¦ý¦A½Ð±ÐGB¤j¤j¥t¥~¤GÓ°ÝÃD¡A
1.Y³]©w¦¨False®É¡A¦b§å¦¸¤U¸ü®É"¦³®É"·|¥X²{¿ù»~µøµ¡¡AY«ö°£¿ùÁä¡A«h³£¬O«ü¦b .RefreshBackgroudQuery:=False³o¤@¬q
¡A«ö§¹²×¤î¦A«·s³]©w«á¡A«·s°õ¦æ¤@¦¸¡A«o¤S¨S¦³°ÝÃD¡A³o¬O¤°»òì¦]©O¡H
Y¬O¤£·QÅý¿ù¸Óªº°T®§¤@ª½¥X²{¡A·QÅývbaÄ~Äò©¹¤U¶]¨ì§¹¦¨¡AY§Ú¦bµ{¦¡«e¬q¥[¤J "On Error Resume Next"¤£ª¾¹D¦³¨S¦³§@¥Î©O¡H(¦]¤£¬O·QÅý¥¦¥X²{¥¦´N·|¥X²{¡A©Ò¥H§Ú¤£¾å±o¦³¨S¦³§@¥Î)
2.²Ä¤@Ó°ÝÃD¬OY¬O¦b¤U¸üºô¸ô¸ê®Æ¦³®É·|¹J¨ì¬Y¤@µ§¸ê®Æ¬d¤£¨ì¡A¤]·|¥X²{¥t¤@ºØ´£¿ôµøµ¡(Ãþ¦ü¬d¤£¨ì¸Óµ§¸ê®Æµ¥ªº°T®§)¡AY§Ú¤]·Q©¿²¤ÅývbaÄ~Äò©¹¤U¶]¨ì§¹¦¨¡A¨º§Ú¤S¸Ó«ç»ò§@·|¸û¦n ¡H
YGB¤j¤j¦³®É¶¡½Ð¦A¼·ªÅÀ°¤p§Ì¸Ñµª¡A¤£¬Æ·P¿E¡AÁÂÁ¡I¡I
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)