- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2013-8-30 00:22 ½s¿è
ayubbs µoªí©ó 2013-8-29 22:46
1. ¦pn¶}±ÒÀɮצb¦Pӥؿý¤U®É¡A¬O§_¥i¤£«ü©w¸ô®|¤è¦¡¦Ó¶}±ÒÀÉ®×
Workbooks.Open ThisWorkbook.Path & "\AA.xls"
2. Sheet »P userform ¤¤ªº CommandButton ª«¥ó³B²z,
µ{¦¡½X¤º®e³£¬Û¦P¹ê¦b¤£¤F¸Ñ¬O¦óì²z·|³o¼Ë?
¦]¬° ¥Îuserform¤è¦¡¦A¥[¤JCommandButton«ö¶s,
°õ¦æ®Éªº«ü¥O¤j³£¦b¸Ó userform ªºµ{§Ç¤º,
¬G¦Ó©¹©¹¤£»Ý«ü©w CommandButton «ö¶sªº¤÷ª«¥ó(userform)´N¥i¥¿±`¨Ï¥Î.
µM¦Ó¬Û¹ï©ó¦b SHEET ¤¤¥[¤Jªº CommandButton ª«¥ó,
ÁöµM¨âªÌ³£¬O CommandButton ª«¥ó,
¦ý«áªÌ¦³¨Ç«ü¥O¬O¨S¦³ªº,
¨Ò¦p : CommandButton1.TabIndex
ÁÙ¦³¦b SHEET ¤¤ªº CommandButton ª«¥ó¦b¤Þ¥Î®É,
¥i¯à±`±`»Ýn¥Î Sheet("Sheet1").CommandButton1 ªº¤è¦¡¤~¯à¥¿±`¨Ï¥Î
(·í«ü¥O«D¦b¸Óª«¥ó¥»¨ªº¨Æ¥óµ{§Ç<CommandButton1_Click ¤§Ãþ>¤¤®É, ¨Ò¦p : Worksheet_Change).
3. ¦³¤@¨Ç°ÝÃD§Ú¥i¥H¦b¿ý»s¤º®e¤¤§¹¦¨¡A·Q¦b¿ý»s¤º®e¶i¦æ¨ì¬Y¤@³¡¥÷®É¥[¤J°õ
¦æ¥HVBA ¤è¦¡ªºµ{¦¡µM«á¦AÄ~Äò¶i¦æ§Ú¿ý»sªº¤º®e¦ý¦]¤£¼ô±x¨Ï¥Î¤è¦¡¡A³£¤@ª½¤£¯à¦¨¥\¡C
¤£¯à¥¿½T§¹¦¨°Ê§@¤j³£¬O®M¥Î¿ù»~,
§An¥ý½T»{§A·Q°µªº¬O¤°»ò,
µ{¦¡¼g¦n«á¥i¥H¦b°ÝÃDµo¥Í«eªº«ü¥O¦æ,
¥Î·Æ¹«ÂI¤@¤U¨ä¥ªÃ䪺¦Ç¦â°Ï°ì¶}±Ò¤¤Â_¼Ò¦¡.
«ö F5 «öÁä°õ¦æ¨ì¸Ó¦æµ{¦¡·|¼È°±,
¦A§Q¥Î F8 «öÁ䪺³æ¨B¼Ò¦¡,
¥ý½T»{¤U¤@¦æ§Y±N°õ¦æªº«ü¥O¤¤ªº¬ÛÃöÅܼƩΪ«¥ó¬O§_¬°¥¿½TÈ.
¨úÈ¥i±N·Æ¹«²¾¨ì·Q°lÂܪºÅܼƩΪ«¥ó¦WºÙ¤W¤£°Ê´X¬í´N·|¨q¥X¨ä²{¦bÈ,
©Î¬O¶}±Ò °Ï°ìÅÜ¼Æ µøµ¡½T»{ÅܼÆȬO§_¥¿½T,
¤]¥i©ó §Y®Éµøµ¡¤¤ µ½¥Î ? «ü¥O¨DÈ.
¦A©ó §Y®Éµøµ¡¤¤ ¹ê°µ¸Ó¦æ«ü¥O,
¬Ý¬O§_°Ê§@©ÎÅã¥Üªºµ²ªG¥¿±`,
³o¼Ë¤@¨B¤@¨Bªº§ä¥X°ÝÃDÂI.
¥t¥~¦b§Y®Éµøµ¡¤¤¤£¯à¥¿±`°õ¦æ With «ü¥O,
©Ò¥H¥²¶·¥ý±N . ¥N´«¦¨§¹¾ãªºª«¥ó¤Þ¥Î«ü¥O¤~¯à¥¿±`¹B§@,
¨Ò¦p :
With Sheets("Sheet1")
With .Cells(2, 3)
With .Font
.Name = "·s²Ó©úÅé"
.Bold = True
.ColorIndex = 1
End With
End With
End With
¨ä¤¤ ¦b§Y®Éµøµ¡ n¹ê°µ¥X .Name = "·s²Ó©úÅé" ³o¦æ«ü¥Oªºµ²ªG,
´Nn§ï¦¨ Sheets("Sheet1").Cells(2, 3).Font.Name = "·s²Ó©úÅé" ¤~¥i¥H.
ÁÙ¦³Y«ü¥O¤Óªø¤£¦n°O¾Ð©Î¬O¤£½T©w±µ¤U¨Ó¸Ó¤UþӰѼƮÉ,
¥i¥H¥ý¦b§Y®Éµøµ¡¤W¥Î¥H¤Uªº¤è¦¡¨Ó§ì¥¿½Tªº«ü¥O½X:
range.
sheets.
range.Find(
¥H¤W¬O§Ú³]p Excel VBA µ{¦¡®É¸I¾À¤FµL¼Æ¦¸,
¤~¸Õ¥X¨Óªº§Þ¥©. |
|