LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default VLookup type mismatch

Hi,

I have the next:

Private Sub btn4_Click()

Dim magneto As Range
Dim numero
Dim valor As Variant
Dim existe As Boolean

Sheets("info").Visible = True
Set magneto = Worksheets("info").Range("A2:AY65526")
numero = ufConsulta.cboOrden.Value
existe = protege.existe(CStr(numero))

If existe = True Then
ufConsulta.txt33.Value = Application.VLookup(numero, magneto, 1, falso)
'Orden de reparación
ufConsulta.txt34.Value = Application.VLookup(numero, magneto, 2, falso)
'Número de siniestro
....

When the numero's value is something like "96LP" there's no problem.
However, when the value is like "96", then appears a type mismatch error.

What am I doing wrong?

TiA
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Vlookup Type Mismatch Error ssjody[_9_] Excel Programming 2 August 2nd 06 10:24 PM
vlookup type mismatch error Lilivati Excel Programming 3 July 13th 06 08:31 AM
Type mismatch in vlookup carg1[_12_] Excel Programming 5 April 6th 06 11:58 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type Mismatch in Vlookup? LJones[_2_] Excel Programming 1 August 5th 04 07:30 AM


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"