Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default cant find project or library


When I try to use the following function I get the following error! What am
I doing wrong?(I think the curosr isstopping on the word CELL)
Thanks

Function CountYellow(MyRange As Range)
Dim iCount As Integer

Application.Volatile
iCount = 0
For Each cell In MyRange
If cell.Interior.ColorIndex = 6 Then
iCount = iCount + 1
End If
Next cell
CountYellow = iCount
End Function
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default cant find project or library

Open that workbook
go into the VBE
select that project
tools|References

Look for MISSING

When there's a missing reference, you can get an error like this.

You'll have to decide to remove that reference (if it's not being used) or to
replace it with the version that you have.

pcor wrote:

When I try to use the following function I get the following error! What am
I doing wrong?(I think the curosr isstopping on the word CELL)
Thanks

Function CountYellow(MyRange As Range)
Dim iCount As Integer

Application.Volatile
iCount = 0
For Each cell In MyRange
If cell.Interior.ColorIndex = 6 Then
iCount = iCount + 1
End If
Next cell
CountYellow = iCount
End Function


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default cant find project or library

That did it...Thanks
Ian M

"Dave Peterson" wrote:

Open that workbook
go into the VBE
select that project
tools|References

Look for MISSING

When there's a missing reference, you can get an error like this.

You'll have to decide to remove that reference (if it's not being used) or to
replace it with the version that you have.

pcor wrote:

When I try to use the following function I get the following error! What am
I doing wrong?(I think the curosr isstopping on the word CELL)
Thanks

Function CountYellow(MyRange As Range)
Dim iCount As Integer

Application.Volatile
iCount = 0
For Each cell In MyRange
If cell.Interior.ColorIndex = 6 Then
iCount = iCount + 1
End If
Next cell
CountYellow = iCount
End Function


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find formatting doesn't work: "Excel cannot find data" Kasama Excel Discussion (Misc queries) 1 August 18th 06 01:40 PM
Vlookup to Return a Range of Data Rob Excel Discussion (Misc queries) 13 June 1st 06 04:02 AM
How to convert MS Project to MS Excel. I don't have MS Project. Jane Excel Discussion (Misc queries) 1 February 20th 06 10:01 PM
Project or library bach New Users to Excel 5 October 5th 05 09:07 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"