User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Excel Module Error? Page [1]  
Hiro
All American
4673 Posts
user info
edit post

I'm trying to run a simple module that will assign a Boolean integer whether a cell is highlighted or not.

Here is my code in MVB

Function IsColor(x As Range) As Boolean
If x.Interior.ColorIndex <> xlColorIndexNone Then
IsColor = 0
Else
IsColor = 1
End If
End Function


I've renamed this module Color and returned my excel sheet, which is saved Macro-Enabled Wookbook *.xlsm

When I try to use the formula, for example =IsColor(C4), I am returned an #name? error. This is my first attempt at incorporating a macro. Someone please direct me to what I've done incorrectly? Thanks!!!

5/21/2015 11:24:02 PM

darkone
(\/) (;,,,;) (\/)
11605 Posts
user info
edit post

Can you set a boolean to 0 or 1 or should it be False and True?

5/22/2015 6:30:50 PM

 Message Boards » Tech Talk » Excel Module Error? Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.