Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding files in a folder. Variable not defined error. | Excel Discussion (Misc queries) | |||
Why error message - not enough system resources to display comple. | Excel Discussion (Misc queries) | |||
Variable not defined compile error | Excel Programming | |||
Compile error, variable not defined | Excel Programming | |||
Comple Error Cannot Find Project or Library | Excel Programming |