How to catch the cordenadas taking the line and changing the colunda

0
   Set rgFound = Range("B1:B1000").Find(Sheets("FormAluguer").Range("E10"))
If rgFound Is Nothing Then
    resposta = MsgBox("Não encontrado.", vbYesNo + vbExclamation, "stock incorrecto")
Else
Dim mrange As String
Dim linha As Integer


mrange = rgFound.Address(RowAbsolute:=False, ColumnAbsolute:=False, External:=False)
 resposta = MsgBox("Foi encontrado em :" + rgFound.Row, vbYesNo + vbExclamation, "stock incorrecto")

End If
  

mrange returns $ b7 and I wanted to pick up this value and retain the   line in this case 7 to later do accounts in column The line 7 do   accounts

I tried rgFound.Address (). row but it does not work

    
asked by anonymous 03.07.2017 / 14:59

1 answer

0

The problem was in the concatenate operator

  

response = MsgBox ("Found in:" + rgFound.Row, vbYesNo +   vbExclamation, "wrong stock")

should look like this:

  

response = MsgBox ("Found in:" & rgFound.Row, vbYesNo +   vbExclamation, "wrong stock")

    
03.07.2017 / 16:06