Consulting

Results 1 to 3 of 3

Thread: Check Range

  1. #1
    VBAX Tutor
    Joined
    Jan 2011
    Posts
    272
    Location

    Check Range

    Hi..
    Personal
    I want to check if the cell C2: C50 is some record, if code 1,2,3 if the record shows a message, code already registered ... otherwise the registration is successfully done!

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    You'll need to explain further. Maybe a sample to show what's happening.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Tutor
    Joined
    Jan 2011
    Posts
    272
    Location
    Hi....I'm Solved...


    [VBA]Private Sub CommandButton1_Click()
    Dim RefId As String

    'Valor a pesquisar
    RefId = txtCod

    If RefId = "" Then
    MsgBox "Digite um Valor Inválido"
    txtCod.SetFocus
    Exit Sub

    Else
    'Chama a Function
    ProcuraRefId (RefId)
    End If

    If sLocaliza = True Then
    MsgBox "Referencia :- " & RefId & " Localizada em :- " & sCel
    Else
    MsgBox "Referencia não Localizada"
    End If

    End Sub
    [/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •