How to reference a variable with a space in it

B

Brian Lukanic

I get a runtime error 438 (object doesn't support this property or method)
when trying to reference a custom task field that has a space in it. Default
columns with spaces are ok though.

What do I need to do to be able to resolve this. As an example"

'This one works fine
MsgBox T.Name & " is the name of the task."
'This one works fine; Default columns with a space can be read successfully
by removing the space
MsgBox T.BaselineStart & " is the task's baseline start."
'This one fails; Custom columns are not read if I remove the space
MsgBox T.FavoriteColor & " is the task's favorite color."
'This one fails; Custom columns are not read if I retain the space
MsgBox T.Favorite Color & " is the task's favorite color."
 

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

Top