View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
John Pierce John Pierce is offline
external usenet poster
 
Posts: 93
Default Vlookup and Type Mismatch

WorksheetFunction doesn’t work at all. I had to change to
“Application.Vlookup”. I think it’s an Excel version thing. I also
changed “Dim STIPrice” to Variant. Now the program will run past the
“STIPrice = Application.Vlookup …” line but stops farther down where I
try to use STIPrice. It says Run-time erro ‘13’, Type mismatch, and
the little yellow info box that pops up when I put the cursor on it
says STIPrice = Error 2042. Also, the info for the “STIPrice =
Application.Vlookup…” says Error 2042, which I understand is the VBA
equivalent of #N/A. Interestingly, the procedure runs perfectly when
Security doesn’t equal “SunTrust …”. Any ideas?