Jump to content
Fórum Script Brasil
  • 0

VERIFICAR DATA ATUAL


DANYY

Question

Bom dia, criei um formulario onde aparece a data e hora atual conforme configurado relogio do PC. Criei tambem uma planilha onde tem todos os dias dos meses em cada linha da coluna B: por exemplo:

Coluna B

01/09/2011

02/09/2011

03/09/2011

04/09/2011

e assim sucessivamente até o ultimo dia do mes.. como fazer para que ao clicar no botao confirma (criado no formulario), o sistema localize nessa planilha a linha com o dia atual?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Tente assim...

Sub Data()
    Cells.Find(What:=CDate(Date), After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
End Sub

Link to comment
Share on other sites

  • 0
Tente assim...

Sub Data()
    Cells.Find(What:=CDate(Date), After:=ActiveCell, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False).Activate
End Sub

Bom dia, obrigada pela ajuda mais utilizando esse codigo acima tambem ocorreu erro então fiz da seguinte forma:

dim data as string

data = date

Cells.Find(What:=data,After=ActiveCell, Lookin:=xlFormulas,_

LookAt:=xlPart,SearchOrder:=xlByRowa, SearchDirection:=xlNext,_

MatchCase:=False, SearchFormat:=False).Activate

Dessa forma deu certo, obrigada!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...