Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error in Userform macro
The following routine results in a compile error "Next without For"
....any idea why? Private Sub ComboBox1_Change() Dim Row As Integer For Row = 8 To 23 If Sheets("Control data").Cells(Row, 3) = CapDials.ComboBox1.Value Then CapDials.ListBox1.AddItem Sheets("Control data").Cells(Row, 4) Next Row End Sub -- Mike Watkins |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error in Userform macro
No End If
Private Sub ComboBox1_Change() Dim Row As Integer For Row = 8 To 23 If Sheets("Control data").Cells(Row, 3) = _ CapDials.ComboBox1.Value Then CapDials.ListBox1.AddItem Sheets("Control data").Cells(Row, 4) End If Next Row End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "watkincm" wrote in message ... The following routine results in a compile error "Next without For" ...any idea why? Private Sub ComboBox1_Change() Dim Row As Integer For Row = 8 To 23 If Sheets("Control data").Cells(Row, 3) = CapDials.ComboBox1.Value Then CapDials.ListBox1.AddItem Sheets("Control data").Cells(Row, 4) Next Row End Sub -- Mike Watkins |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error in Userform macro
Duh! Thanks Bob
-- Mike Watkins "Bob Phillips" wrote: No End If Private Sub ComboBox1_Change() Dim Row As Integer For Row = 8 To 23 If Sheets("Control data").Cells(Row, 3) = _ CapDials.ComboBox1.Value Then CapDials.ListBox1.AddItem Sheets("Control data").Cells(Row, 4) End If Next Row End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "watkincm" wrote in message ... The following routine results in a compile error "Next without For" ...any idea why? Private Sub ComboBox1_Change() Dim Row As Integer For Row = 8 To 23 If Sheets("Control data").Cells(Row, 3) = CapDials.ComboBox1.Value Then CapDials.ListBox1.AddItem Sheets("Control data").Cells(Row, 4) Next Row End Sub -- Mike Watkins |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Password Protect Macro - Compile Error | Excel Discussion (Misc queries) | |||
Macro Compile Error | Excel Programming | |||
Macro / Compile Error / Duplicate Declaration | Excel Worksheet Functions | |||
macro compile error | Excel Programming | |||
MVP Challenge. Erratic Userform Compile Error | Excel Programming |