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

[µo°Ý] §Q¥Îapplication.inputbox·j´M¤é´Á

[µo°Ý] §Q¥Îapplication.inputbox·j´M¤é´Á

¥»©«³Ì«á¥Ñ »a³· ©ó 2017-8-18 21:09 ½s¿è

¤p§Ì§Ú¨Ï¥Î Application.Inputbox ·j´M¤é´Áªº®É­Ô¡K
¦b¿é¤J1/1®É¡A·|·j´M¨ì11/1¡K

¦Ó§ï¿é¤J1/2¡A«o¥i¥H¥¿½T·j´M¨ì1/2¡A³o³¡¥÷¬O­þÃä¥X°ÝÃD©O¡H
³Â·Ð¦U¦ì°ª¤âÀ°¦£¸Ñµª¡AÁÂÁ¡C
--------------------------------------------------------------------
²Ä¤G­ÓºÃ°Ý¡J
Application.Inputbox©ÒÅã¥Üªº¤é´Á(¨Ò¡J 1/1/2017)
¥i¥HÅý¥LÅܦ¨ 2017/1/1 ¶Ü¡H
  1. Sub FindDate()
  2. Dim FD As Date
  3. FD = Application.InputBox("½Ð¿é¤J¤é´Á", "¤é´Á·j´M", Default:=Date)
  4. If FD = False Then
  5. Exit Sub
  6. Else
  7. Range("a1:na1").Find(what:=FD).Select
  8. End If
  9. End Sub
½Æ»s¥N½X

¦^´_ 1# »a³·


    Sub FindDate()
    Dim FD As Date
   
    FD = Application.InputBox("½Ð¿é¤J¤é´Á", "¤é´Á·j´M")
    If FD = False Then
       Exit Sub
    Else
        For Row = 1 To 10
            For col = 1 To 10
                If (InStr(1, Cells(Row, col), FD)) Then
                    Range(Cells(Row, col), Cells(Row, col)).Select
                    GoTo found
                End If
            Next col
        Next Row
        MsgBox ("Not Found")
    End If
found:

End Sub

TOP

¦^´_ 2# carloslin0316
  1.         For Row = 1 To 10
  2.             For col = 1 To 10
  3.                 If (InStr(1, Cells(Row, col), FD)) Then
  4.                     Range(Cells(Row, col), Cells(Row, col)).Select
½Æ»s¥N½X
²Ä¤@¦¸ª¾¹D range ¤]¥i¥H³o¼Ë¨Ï¥Î...¡A¯u¬O¤W¤F¤@½Ò

§Ú·Q¦A°Ý­Ó°ÝÃD
Application.InputBox("½Ð¿é¤J¤é´Á", "¤é´Á·j´M", Default:=Date)

box ¥X¨Ó·|±a¦³ ¤é´Á = 11/1/2017
¦³¿ìªk¥i¥HÅý¥LÅã¥Ü¦¨ 2017/11/1 ¶Ü¡H

TOP

©êºp¡Aµo¤å¶W¹L¤T¤ÀÄÁ¡A¤£¯à¶i¦æ½s¿è
©Ò¥H¡A¤SÅܦ¨¦Û°Ý¦Ûµª...

«á­±¦Û¤vµo²{¥[¤WFormat¤è¦¡¡A´N¥i¥H¹F¨ì§Ú­nªº®ÄªG¤F
Application.InputBox("½Ð¿é¤J¤é´Á", "¤é´Á·j´M", Default:=Format(Date,"yyyy/mm/dd"))

TOP

        ÀR«ä¦Û¦b : Ãø¦æ¯à¦æ¡AÃø±Ë¯à±Ë¡AÃø¬°¯à¬°¡A¤~¯àª@µØ¦Û§Úªº¤H®æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD