vba - need to find the type mismatch in this line of code

  • Thread starter Thread starter bourassa
  • Start date Start date
B

bourassa

While Worksheets("Log-Import").Cells(counter, LogCol).Value And
Worksheets("Log-Import").Cells(counter, UsernameCol).Value And
Worksheets("Log-Imports").Cells(counter, DayCol).Value <> "Logoff" And
username And Cells(counter, DayCol).Value

i cant find the type mismatch please help
 
We won't be able to help you as it will depend upon the values of the
variables.

Check all of the statements in the watch or immediate windows.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
We won't be able to help you as it will depend upon the values of the
variables. ...
...

While Bob is correct in general, in this particular case there's one possibility
that stands out - username. If it's a text string (likely!), then it'll fubar a
boolean expression. That's what I'd guess was throwing the type mismatch error.
 
Back
Top