- ©«¤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 ©ó 2011-11-3 21:55 ½s¿è
1. ¤u§@ªí(IQC¬d¸ß)³oÃä¡A¦pªG¦A¿é¤J·sªºn¬d¸ß¸ê®ÆªºÈ¡A쥻ªºÄæ¦ì¸ê®Æ·|³Q»\±¼¡A½Ð°Ý¦³¤°»ò¤èªk¸Ñ¨M?
icefire722 µoªí©ó 2011-11-2 19:42
nÅý¥¦¤£Âл\«e¬d¸ê®Æªº¤èªk§Ú·Q¨ìªº¦³¨âºØ:
1. ¨C¦¸³£§ä³Ì«á¤@¦æ¸ê®Æ, µM«á·s¼W¨ì¨ä©³¤U¤@¦æ.(¬d¸ß¸ê®Æ¦C¸¹·|¤@ª½²Ö¥[¤U¥h)- Sub DateButton_Click()
- Dim srcRange As Range, fndRange As Range
- Dim fstAddress As String, CurRow As Long
- Sheets("IQC¬d¸ß").Select
- Set srcRange = Sheets("¨C¤éIQC").Range("A19").CurrentRegion.Columns(3)
- Set fndRange = srcRange.Find(what:=Range("B3").Value)
- If Not fndRange Is Nothing Then
- fstAddress = fndRange.Address
- CurRow = Cells(7, 1).End(xlDown).Row + 1
- Do
- Cells(CurRow, 1).Value = fndRange.Offset(, -2).Value
- Cells(CurRow, 2).Value = fndRange.Offset(, 0).Value
- Cells(CurRow, 3).Value = fndRange.Offset(, 2).Value
- Set fndRange = srcRange.FindNext(after:=fndRange)
- Loop Until fndRange.Address = fstAddress
- Else
- MsgBox "µL¦¹§å¸¹!!"
- End If
- End Sub
½Æ»s¥N½X 2. °O¿ý³Ì«á¤@¦C¦C¸¹, ¨C¦¸·s¼W«á±N¸Ó¦C¸¹¥[1.(¨C¦¸«¶}ÀɦC¸¹·|«·s±q²Ä7¦C¶}©l)- Public CurRow As Long
- Option Explicit
- Sub DateButton_Click()
- Dim srcRange As Range, fndRange As Range
- Dim fstAddress As String
- CurRow = CurRow + 1 - (CurRow < 6) * 6
- Sheets("IQC¬d¸ß").Select
- Set srcRange = Sheets("¨C¤éIQC").Range("A19").CurrentRegion.Columns(3)
- Set fndRange = srcRange.Find(what:=Range("B3").Value)
- If Not fndRange Is Nothing Then
- fstAddress = fndRange.Address
- Do
- Cells(CurRow, 1).Value = fndRange.Offset(, -2).Value
- Cells(CurRow, 2).Value = fndRange.Offset(, 0).Value
- Cells(CurRow, 3).Value = fndRange.Offset(, 2).Value
- Set fndRange = srcRange.FindNext(after:=fndRange)
- Loop Until fndRange.Address = fstAddress
- Else
- MsgBox "µL¦¹§å¸¹!!"
- End If
- End Sub
½Æ»s¥N½X ¬Ý¬Ý¬O§_²Å¦X§Aªº»Ý¨D.
ÃD¥~¸Ü :
Y»Ýn¥ÎÅܼƨӦs©ñ¦C¸¹¥H«K¨Ï¥Î®É¤£«Øij¥Î Integer ,
¦]¬°¥¦¥u¯à¦s¨ì 32767 ,
¶ZÂ÷ª© Excel ªº³Ì¤j¦C¸¹ 65536 ¬O¤£°÷¥Îªº. |
|