Microsoft Office Forums Outlook VBA: How to return OlColor from property or function?

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2019, 12:05 PM
asdfghjk asdfghjk is offline Outlook VBA: How to return OlColor from property or function? Windows 10 Outlook VBA: How to return OlColor from property or function? Office 2016
Novice
Outlook VBA: How to return OlColor from property or function?
 
Join Date: Sep 2019
Posts: 1
asdfghjk is on a distinguished road
Exclamation 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
Reply With Quote
Reply

Tags
categories, color, vba

Thread Tools
Display Modes


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 VBA: How to return OlColor from property or function? 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


All times are GMT -7. The time now is 08:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft