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

[µo°Ý] Ãö©óUserForm1¤¤ªºListBoxÀ³¥Î

[µo°Ý] Ãö©óUserForm1¤¤ªºListBoxÀ³¥Î

¥»©«³Ì«á¥Ñ av8d ©ó 2022-10-17 13:07 ½s¿è
  1. Private Sub ListBox2_Click()
  2.     For i = 0 To ListBox1.ListCount - 1
  3.         If ListBox2.Selected(i) = True Then
  4.             ActiveWorkbook.Sheets(14).Select
  5.             Cells(1, 1).Select
  6.         End If
  7.     Next
  8. End Sub
½Æ»s¥N½X
·í¿ï¾Ü²Ä¤@­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºA1 ¡A§YCells(1, 1)
·í¿ï¾Ü²Ä¤G­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºF1 ¡A§YCells(1, 6)
·í¿ï¾Ü²Ä¤T­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºK1 ¡A§YCells(1, 11)
·í¿ï¾Ü²Ä¥|­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºP1 ¡A§YCells(1, 16)
·í¿ï¾Ü²Ä¤­­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºA24 ¡A§YCells(24, 1)
·í¿ï¾Ü²Ä¤»­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºF24 ¡A§YCells(24, 6)
·í¿ï¾Ü²Ä¤C­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºK24 ¡A§YCells(24, 11)
·í¿ï¾Ü²Ä¤K­Ó¿ï¶µ®É¡A§Ú­n¿ï¾Ü¦b¤u§@ªí14ªºP24 ¡A§YCells(24, 16)
¥H¦¹Ãþ±À¡A¹w­p·|¦³50­Ó¿ï¶µ¡A¨C¥|­Ó¿ï¶µ·|´«¦C¡A½Ð°Ý¸Ó¦p¦ó¼¶¼g¡HÁÂÁÂ

¥Ø«e°ß¤@·Q¨ìªº¤èªk´N¬O¼g50¦¸
  1.             If i = 0 Then Cells(1, 1).Select
  2.             If i = 1 Then Cells(1, 6).Select
  3.             If i = 2 Then Cells(1, 11).Select
  4.             If i = 3 Then Cells(1, 16).Select
½Æ»s¥N½X

¦^´_ 3# singo1232001


·PÁ«e½úªº¸Ñµª¡A«Ü¨ü¥Î¡A
¥Ø«e§Ú§ï¼g¤F¤@¤U¡A¦ý¬O¤S¥d¦í¤F¡A
¦pF1¦pªG¬OªÅ¡A§Ú³]©w¥[¤Jªº¶µ¥Ø·|²¤¹L¡A
¦ý«ü©w¦ì¸m´N·|¦ì²¾¡A¸Ó¦p¦ó§ï¼g¡AÁÂÁ¡C
  1. Private Sub UserForm_Activate()
  2.     Dim j As Integer
  3.    
  4.     For j = 1 To 300 Step 23
  5.         If ActiveWorkbook.Sheets(1).Cells(j, 1).Value <> "" Then ListBox1.AddItem ActiveWorkbook.Sheets(1).Cells(j, 1).Value & "¡G" & ActiveWorkbook.Sheets(1).Cells(j + 20, 4).Value
  6.         
  7.         If ActiveWorkbook.Sheets(1).Cells(j, 6).Value <> "" Then ListBox1.AddItem ActiveWorkbook.Sheets(1).Cells(j, 6).Value & "¡G" & ActiveWorkbook.Sheets(1).Cells(j + 20, 9).Value
  8.         
  9.         If ActiveWorkbook.Sheets(1).Cells(j, 11).Value <> "" Then ListBox1.AddItem ActiveWorkbook.Sheets(1).Cells(j, 11).Value & "¡G" & ActiveWorkbook.Sheets(1).Cells(j + 20, 14).Value
  10.                
  11.         If ActiveWorkbook.Sheets(1).Cells(j, 16).Value <> "" Then ListBox1.AddItem ActiveWorkbook.Sheets(1).Cells(j, 16).Value & "¡G" & ActiveWorkbook.Sheets(1).Cells(j + 20, 19).Value
  12.     Next
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# av8d
¦^´_ 9# singo1232001

·PÁ¨â¦ì«e½ú¡A¨ü¯q¨}¦h¡A¼gªk¤£¦P¡A¥Øªº¬Û¦P¡A¥Î³~¨Ï¥Î¼sªx¡C

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD