LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Variable not defined comple error

New to VBA. Excel 2003
I'm getting a compile error: Variable not defined, in the following Macro.
(General) = Open Explicit.
How do I set the variable for Counter

Sub ItemsToPrice()
For Counter = 1 To 300
Set curCell = Worksheets("Sheet4").Cells(Counter, 18)
If Abs(curCell.Value) = 2 Then curCell.Select
Range("C" & ActiveCell.Row & ":M" & ActiveCell.Row).Select
With Selection.Interior
.ColorIndex = 37
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 3
Selection.Font.Bold = True
Range("R" & ActiveCell.Row).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("H" & ActiveCell.Row).Select
Selection.ClearContents
Next Counter
End Sub
 
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
Finding files in a folder. Variable not defined error. Ayo Excel Discussion (Misc queries) 1 March 14th 08 01:14 PM
Why error message - not enough system resources to display comple. BHodges Excel Discussion (Misc queries) 1 September 20th 05 10:01 PM
Variable not defined compile error Phil Hageman[_4_] Excel Programming 4 June 17th 05 01:52 PM
Compile error, variable not defined davegb Excel Programming 5 May 19th 05 04:41 PM
Comple Error Cannot Find Project or Library ExcelMonkey[_190_] Excel Programming 13 March 22nd 05 06:24 PM


All times are GMT +1. The time now is 01:35 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"