- ©«¤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
|
¦^´_ 1# j1221
1. ¦pªG¥u·|¶}¤@Ó Excel ÀÉ, «h¤£¥Î¥´ ThisWorkbook, Y©È¦P®É¥i¯à¶}±Ò¶W¹L¤@Ó Excel ÀÉ®×,
«h½Ð©ó¶}ÀɮɴNª½±µ³]©w«ü¼Ð¨ì¸ÓÀÉ,§_«hY¨Ï¥Î ThisWorkBook ÁÙ¬O¥i¯à·|§ì¨ì¥t¤@ÓÀɮתº¤º®e.
¨Ò¦p :
¦b Module ¸Ì¥[¤W
Dim vOP_OI
¦A¦b Workbook_Open ¸Ì¥[¤W
set vOP_OI=ThisWorkbook
¤Þ¥Î®É«h¥i¥Î vOP_OI.Sheets(2).Name ¨Ó§ì¨ú Sheet ªº Name
2. n¤Þ¥Î Sheet ªº¦W¦r®É, Variant ¥~¤£¥Î¦A¥[ ""
¦]¬°§AªºÀɮקڳo¸Ì¤£¯à¥¿±`°õ¦æ, ©Ò¥H§Ú°w¹ï§A©Ò»¡ªº°ÝÃDÂI,¥t¥~¥Î¤@Óµ{¦¡¨Ó¼ÒÀÀ,§A°Ñ¦Ò¬Ý¬Ý :- Private Sub Workbook_Open()
- Dim iI%, iJ%
- Dim vShtName(10, 2, 8)
-
- Set vOP_OI = ThisWorkbook
-
- iJ = Sheets.Count
- For iI = 1 To iJ
- vShtName(iI, 2, 8) = Sheets(iI).Name
- Debug.Print Sheets(iI).Name = vShtName(iI, 2, 8)
- Next iI
-
- For iI = 1 To iJ
- Sheets(vShtName(iI, 2, 8)).Cells(1, 1) = Sheets(vShtName(iI, 2, 8)).Cells(1, 1) + iI
- Next iI
-
- MsgBox vOP_OI.Sheets(2).Cells(1, 1)
- End Sub
½Æ»s¥N½X
OP_OI_test.zip (7.48 KB)
½Ð¶i¥¨¶°ªº½s¿è¾¹«á«ö F8 ³æ¨B°õ¦æ Æ[¹î¬ÛÃöÅܼƲ§°Ê±¡§Î, §Æ±æ¯à¹ï§A¦³©ÒÀ°§U. |
|