LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Compile error

Hello
I am writing this code (below) and a window appears with Compile error and
Syntax error. I am having also this part of the code highlighted.
Range("A105").Value = IIf(Range("F102") = Range("G102"), Range("A99"),
IIf(Range("F102") Range("G102"), Range("E102"),

This is the code:
Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("A105").Interior.ColorIndex =4 Then
Range("A105").Interior.ColorIndex = 6
Range("A105").Value = IIf(Range("F102") = Range("G102"),
Range("A99"), IIf(Range("F102") Range("G102"), Range("E102"),

Range("H102")))
ElseIf Range("A105").Interior.ColorIndex = 6 Then
Range("A105").Interior.ColorIndex = 4
Range("A105").Value = "WORLD CHAMPIONS 2010"
End If
End Sub

I appriciate even a small help.
Thanks in advance.
 
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
Bubble sort Error (Compile Error: Type Mismtach) Excel Monkey[_2_] Excel Programming 6 April 24th 09 12:16 AM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 11:57 PM.

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"