- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# sammay
½Ð«·s¨îqªí³æ ±±¨î¶µ TextBox ¦WºÙ¨Ì§Ç±Æ¦C ¬° 1-6
ªí³æªºµ{¦¡½X- Dim DataSh As Worksheet, Row_No As Integer, Row_Min As Integer, Row_Max As Integer
- Private Sub UserForm_Initialize() 'ªí³æÅã¥Ü«eªº¹w³]µ{§Ç
- Set DataSh = Sheets("sheet1") '¸ê®Æªº¤u§@¶
- Row_Min = 2 '²Ä¤@µ§ªº¦C¸¹
- Row_Max = DataSh.Cells(Rows.Count, 1).End(xlUp).Row '³Ì«á¤@µ§¦C¸¹
- 'Row_No ¨S¦³µ¹È = 0
- End Sub
- Private Sub CommandButton1_Click() '¤W¤@µ§
- If Row_No > Row_Min Then
- Row_No = Row_No - 1
- Else
- Row_No = Row_Min
- End If
- Show_Data
- End Sub
- Private Sub CommandButton2_Click() '¤U¤@µ§
- If Row_No < Row_Max Then
- Row_No = Row_No + 1
- ElseIf Row_No = 0 Then
- Row_No = Row_Min
- End If
- Show_Data
- End Sub
- Private Sub Show_Data() 'Åã¥Ü¦bTextBoxªº¼Æ¾Ú
- Dim xi As Integer
- For xi = 1 To 6
- Me.Controls("TextBox" & xi) = DataSh.Cells(Row_No, xi).Text
- Next
- End Sub
½Æ»s¥N½X |
|