Select Case issue

  • Thread starter Thread starter Whit
  • Start date Start date
W

Whit

Hi, I am having a problem with the code below. 'Update' is pased to the macro
as a string and can only = one of the items below, but the Case Select does
not match it to any of them.

Select Case Update
Case "Finances"
Finances_Updater UpdateToolName, mybook
Case "Hierarchy"
Hierarchy_Updater UpdateToolName, mybook
Case "Both"
Hierarchy_Updater UpdateToolName, mybook
Finances_Updater UpdateToolName, mybook
End Select

thanks.
 
The first step you should do is make sure the String value you are passing
in is exactly what you think it is. Put a break point on the Select Case
Update statement and then execute this statement in the immediate window...

Print "<" & Update & ">"

Then check to see if the angle brackets butt-up against the word or if there
are "extra" characters (perhaps spaces) attached to the word. Also, the Case
tests will be case-sensitive, so does the word with an upper case letter and
are the rest of the letters lower case?

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top