#1
|
|||
|
|||
Outlook VBA: How to return OlColor from property or function?
I have a custom class with a property for OlColor. When I created an instance of this class the color (OlColor) property was set. However when I reference the parameter it returns a Long value rather than the OlColor value. If I watch the class instance in the 'Watches' window the instance shows the color property as type OlColor. However when I pass it in as a parameter to a function VBA is automatically switching it to a Long which causes the other function to fail.
I have also tested this in a simple test function where I set a variable to OlColor in the function and then have the function return the result. Even though the function is set to return OlColor it again is automatically getting converted to Long. As another workaround I tried using the Long value to set the OlColor, something like OlColor(1), but that doesn't work either. How can I the either 1. keep OlColor rather than Long 2. use the Long value to reference the OlColor |
Tags |
categories, color, vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula/function to return column names for matching values | GiJoe81 | Excel | 1 | 06-27-2015 12:13 AM |
How to get the Right function to return a string that has UPPERCASE letters only | adj | Word VBA | 9 | 08-30-2014 09:21 PM |
Outlook using wrong return address | asharx | Outlook | 2 | 10-12-2011 11:06 AM |
Outlook 2010 F9 function | Emerogork | Outlook | 3 | 05-31-2011 01:51 PM |
Outlook 2010 email setup, return address | DanOst | Outlook | 1 | 09-02-2010 04:26 PM |