Next without For Error

I have been trying to run the following code, and am getting a Next without 
For Error
Any Ideas?

Jim Berglund

Sub DelRows()

Dim i, n As Long
Dim wsNumFrum As Worksheet


Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
                  SearchDirection:=xlPrevious).Row
    For i = 1 To n
        If Range(Cells(i, 1)).Value = "" Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        Else
        Range(Cells(i, 1)).Select
        If Left(Cells(i, 1), 5).Value = "Lname" Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        Else
        If IsNumeric(Cells(i, 5).Value) Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        End If
    Next
        'Sort the data
         ActiveWorkbook.Worksheets("Numbers from Reverse 
Directory").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Numbers from Reverse 
Directory").Sort.SortFields. _
        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
        DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
        .SetRange Range("A1:E5001")
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With


End Sub
 

0
Jim
5/26/2010 5:00:40 PM
excel.programming 6508 articles. 2 followers. Follow

13 Replies
1126 Views

Similar Articles

[PageSpeed] 49

On Wed, 26 May 2010 11:00:40 -0600, "Jim Berglund" <jazzzbo@shaw.ca> wrote:

>I have been trying to run the following code, and am getting a Next without 
>For Error
>Any Ideas?
>
>Jim Berglund
>
>Sub DelRows()
>
>Dim i, n As Long
>Dim wsNumFrum As Worksheet
>
>
>Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                  SearchDirection:=xlPrevious).Row
>    For i = 1 To n
>        If Range(Cells(i, 1)).Value = "" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        If IsNumeric(Cells(i, 5).Value) Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        End If
>    Next
>        'Sort the data
>         ActiveWorkbook.Worksheets("Numbers from Reverse 
>Directory").Sort.SortFields.Clear
>    ActiveWorkbook.Worksheets("Numbers from Reverse 
>Directory").Sort.SortFields. _
>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>        DataOption:=xlSortNormal
>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>        .SetRange Range("A1:E5001")
>        .Header = xlYes
>        .MatchCase = False
>        .Orientation = xlTopToBottom
>        .SortMethod = xlPinYin
>        .Apply
>    End With
>
>
>End Sub
> 

You are missing some End If's
--ron
0
Ron
5/26/2010 5:04:44 PM
I also get a 1004   "Method Range of Object_Global Failed" error with the 
statement

If Range(Cells(i, 1)).Value = "" Then

Jim
"Jim Berglund" <jazzzbo@shaw.ca> wrote in message 
news:OFch7TP$KHA.3880@TK2MSFTNGP04.phx.gbl...
> I have been trying to run the following code, and am getting a Next 
> without For Error
> Any Ideas?
>
> Jim Berglund
>
> Sub DelRows()
>
> Dim i, n As Long
> Dim wsNumFrum As Worksheet
>
>
> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                  SearchDirection:=xlPrevious).Row
>    For i = 1 To n
>        If Range(Cells(i, 1)).Value = "" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        If IsNumeric(Cells(i, 5).Value) Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        End If
>    Next
>        'Sort the data
>         ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields.Clear
>    ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields. _
>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>        DataOption:=xlSortNormal
>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>        .SetRange Range("A1:E5001")
>        .Header = xlYes
>        .MatchCase = False
>        .Orientation = xlTopToBottom
>        .SortMethod = xlPinYin
>        .Apply
>    End With
>
>
> End Sub
>
> 
0
Jim
5/26/2010 5:08:29 PM
Thanks, Ron. That Worked.

How about this line? It's the last one causing problems...
       If Left(.Cells(i, 1), 5).Value = "Lname" Then

Jim

"Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message 
news:h3lqv5hkpf0e1t3q6mchsd1iqhkhprrh2c@4ax.com...
> On Wed, 26 May 2010 11:00:40 -0600, "Jim Berglund" <jazzzbo@shaw.ca> 
> wrote:
>
>>I have been trying to run the following code, and am getting a Next 
>>without
>>For Error
>>Any Ideas?
>>
>>Jim Berglund
>>
>>Sub DelRows()
>>
>>Dim i, n As Long
>>Dim wsNumFrum As Worksheet
>>
>>
>>Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>>                  SearchDirection:=xlPrevious).Row
>>    For i = 1 To n
>>        If Range(Cells(i, 1)).Value = "" Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        Else
>>        Range(Cells(i, 1)).Select
>>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        Else
>>        If IsNumeric(Cells(i, 5).Value) Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        End If
>>    Next
>>        'Sort the data
>>         ActiveWorkbook.Worksheets("Numbers from Reverse
>>Directory").Sort.SortFields.Clear
>>    ActiveWorkbook.Worksheets("Numbers from Reverse
>>Directory").Sort.SortFields. _
>>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, 
>> _
>>        DataOption:=xlSortNormal
>>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>>        .SetRange Range("A1:E5001")
>>        .Header = xlYes
>>        .MatchCase = False
>>        .Orientation = xlTopToBottom
>>        .SortMethod = xlPinYin
>>        .Apply
>>    End With
>>
>>
>>End Sub
>>
>
> You are missing some End If's
> --ron 

0
Jim
5/26/2010 5:24:06 PM
Here is your For..Next loop with the two "End If" statements you omitted 
shown in upper case...

For i = 1 To n
    If Range(Cells(i, 1)).Value = "" Then
        Range(Cells(i, 1), Cells(i, 5)).ClearContents
    Else
        Range(Cells(i, 1)).Select
        If Left(Cells(i, 1), 5).Value = "Lname" Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        Else
            If IsNumeric(Cells(i, 5).Value) Then
                Range(Cells(i, 1), Cells(i, 5)).ClearContents
            End If
        END IF
    END IF
Next

Notice that with consistent indenting, it is much easier to see when block 
structures (such as If..Then/End If, For..Next, etc.) are not closed 
properly.

-- 
Rick (MVP - Excel)



"Jim Berglund" <jazzzbo@shaw.ca> wrote in message 
news:OFch7TP$KHA.3880@TK2MSFTNGP04.phx.gbl...
> I have been trying to run the following code, and am getting a Next 
> without For Error
> Any Ideas?
>
> Jim Berglund
>
> Sub DelRows()
>
> Dim i, n As Long
> Dim wsNumFrum As Worksheet
>
>
> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                  SearchDirection:=xlPrevious).Row
>    For i = 1 To n
>        If Range(Cells(i, 1)).Value = "" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        If IsNumeric(Cells(i, 5).Value) Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        End If
>    Next
>        'Sort the data
>         ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields.Clear
>    ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields. _
>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>        DataOption:=xlSortNormal
>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>        .SetRange Range("A1:E5001")
>        .Header = xlYes
>        .MatchCase = False
>        .Orientation = xlTopToBottom
>        .SortMethod = xlPinYin
>        .Apply
>    End With
>
>
> End Sub
>
> 
0
Rick
5/26/2010 5:26:39 PM
The real problem is an If without and End If.   See if this works.

For i = 1 To n
        If Range(Cells(i, 1)).Value = "" Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        Else
        Range(Cells(i, 1)).Select
        End If
        If Left(Cells(i, 1), 5).Value = "Lname" Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        ElseIf IsNumeric(Cells(i, 5).Value) Then
            Range(Cells(i, 1), Cells(i, 5)).ClearContents
        End If
Next




"Jim Berglund" <jazzzbo@shaw.ca> wrote in message 
news:OFch7TP$KHA.3880@TK2MSFTNGP04.phx.gbl...
>I have been trying to run the following code, and am getting a Next without 
>For Error
> Any Ideas?
>
> Jim Berglund
>
> Sub DelRows()
>
> Dim i, n As Long
> Dim wsNumFrum As Worksheet
>
>
> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                  SearchDirection:=xlPrevious).Row
>    For i = 1 To n
>        If Range(Cells(i, 1)).Value = "" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        If IsNumeric(Cells(i, 5).Value) Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        End If
>    Next
>        'Sort the data
>         ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields.Clear
>    ActiveWorkbook.Worksheets("Numbers from Reverse 
> Directory").Sort.SortFields. _
>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>        DataOption:=xlSortNormal
>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>        .SetRange Range("A1:E5001")
>        .Header = xlYes
>        .MatchCase = False
>        .Orientation = xlTopToBottom
>        .SortMethod = xlPinYin
>        .Apply
>    End With
>
>
> End Sub
>
> 


0
JLGWhiz
5/26/2010 5:46:56 PM
Thanks. I understand. I thought the Else If's (or Elseif's, which I also 
tried)) replaced the need for End If's
Jim

"Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message 
news:OdSJdiP$KHA.5464@TK2MSFTNGP05.phx.gbl...
> Here is your For..Next loop with the two "End If" statements you omitted 
> shown in upper case...
>
> For i = 1 To n
>    If Range(Cells(i, 1)).Value = "" Then
>        Range(Cells(i, 1), Cells(i, 5)).ClearContents
>    Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>            If IsNumeric(Cells(i, 5).Value) Then
>                Range(Cells(i, 1), Cells(i, 5)).ClearContents
>            End If
>        END IF
>    END IF
> Next
>
> Notice that with consistent indenting, it is much easier to see when block 
> structures (such as If..Then/End If, For..Next, etc.) are not closed 
> properly.
>
> -- 
> Rick (MVP - Excel)
>
>
>
> "Jim Berglund" <jazzzbo@shaw.ca> wrote in message 
> news:OFch7TP$KHA.3880@TK2MSFTNGP04.phx.gbl...
>> I have been trying to run the following code, and am getting a Next 
>> without For Error
>> Any Ideas?
>>
>> Jim Berglund
>>
>> Sub DelRows()
>>
>> Dim i, n As Long
>> Dim wsNumFrum As Worksheet
>>
>>
>> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>>                  SearchDirection:=xlPrevious).Row
>>    For i = 1 To n
>>        If Range(Cells(i, 1)).Value = "" Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        Else
>>        Range(Cells(i, 1)).Select
>>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        Else
>>        If IsNumeric(Cells(i, 5).Value) Then
>>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>        End If
>>    Next
>>        'Sort the data
>>         ActiveWorkbook.Worksheets("Numbers from Reverse 
>> Directory").Sort.SortFields.Clear
>>    ActiveWorkbook.Worksheets("Numbers from Reverse 
>> Directory").Sort.SortFields. _
>>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, 
>> _
>>        DataOption:=xlSortNormal
>>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>>        .SetRange Range("A1:E5001")
>>        .Header = xlYes
>>        .MatchCase = False
>>        .Orientation = xlTopToBottom
>>        .SortMethod = xlPinYin
>>        .Apply
>>    End With
>>
>>
>> End Sub
>>
>> 
0
Jim
5/26/2010 5:48:20 PM
On Wed, 26 May 2010 11:00:40 -0600, "Jim Berglund" <jazzzbo@shaw.ca>
wrote:

>I have been trying to run the following code, and am getting a Next without 
>For Error
>Any Ideas?
>
>Jim Berglund
>
>Sub DelRows()
>
>Dim i, n As Long
>Dim wsNumFrum As Worksheet
>
>
>Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>          n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                  SearchDirection:=xlPrevious).Row
>    For i = 1 To n
>        If Range(Cells(i, 1)).Value = "" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        Range(Cells(i, 1)).Select
>        If Left(Cells(i, 1), 5).Value = "Lname" Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        Else
>        If IsNumeric(Cells(i, 5).Value) Then
>            Range(Cells(i, 1), Cells(i, 5)).ClearContents
>        End If
>    Next
>        'Sort the data
>         ActiveWorkbook.Worksheets("Numbers from Reverse 
>Directory").Sort.SortFields.Clear
>    ActiveWorkbook.Worksheets("Numbers from Reverse 
>Directory").Sort.SortFields. _
>        Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>        DataOption:=xlSortNormal
>    With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>        .SetRange Range("A1:E5001")
>        .Header = xlYes
>        .MatchCase = False
>        .Orientation = xlTopToBottom
>        .SortMethod = xlPinYin
>        .Apply
>    End With
>
>
>End Sub
> 


In you For Next loop how have a number of If statements.
The number of "If" and "End If" does not match. There are 3 "If" but
only one "End If".

Hope this helps / Lars-�ke
0
Lars
5/26/2010 6:01:52 PM
This kind of syntax is pretty common:

  Range(Cells(i, 1), Cells(i, 5)).ClearContents

But I bet that this syntax isn't doing what you want:
If Range(Cells(i, 1)).Value = "" Then

I bet you meant:
If Cells(i, 1).Value = "" Then

If you use:
If Range(Cells(i, 1)).Value = "" Then

Then cells(i,1) better contain something that looks like an address (or a range
name).  Otherwise, you'll get a different error.

Since the default property of that cells(i,1) is value, you're doing:
If Range(Cells(i, 1).value).Value = "" Then

It makes sense if Cells(i,1) contained something like:  b99
Then your code would be doing:
if range("B99").value = "" then





Jim Berglund wrote:
> 
> I have been trying to run the following code, and am getting a Next without
> For Error
> Any Ideas?
> 
> Jim Berglund
> 
> Sub DelRows()
> 
> Dim i, n As Long
> Dim wsNumFrum As Worksheet
> 
> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>           n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>                   SearchDirection:=xlPrevious).Row
>     For i = 1 To n
>         If Range(Cells(i, 1)).Value = "" Then
>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>         Else
>         Range(Cells(i, 1)).Select
>         If Left(Cells(i, 1), 5).Value = "Lname" Then
>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>         Else
>         If IsNumeric(Cells(i, 5).Value) Then
>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>         End If
>     Next
>         'Sort the data
>          ActiveWorkbook.Worksheets("Numbers from Reverse
> Directory").Sort.SortFields.Clear
>     ActiveWorkbook.Worksheets("Numbers from Reverse
> Directory").Sort.SortFields. _
>         Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, _
>         DataOption:=xlSortNormal
>     With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>         .SetRange Range("A1:E5001")
>         .Header = xlYes
>         .MatchCase = False
>         .Orientation = xlTopToBottom
>         .SortMethod = xlPinYin
>         .Apply
>     End With
> 
> End Sub
> 

-- 

Dave Peterson
0
Dave
5/26/2010 6:18:02 PM
OK, Thanks for the explanation. I am down to the short strokes and now have 
only one hiccup left (it may have been missed in a previous note)

      If Left(.Cells(i, 1), 5).Value = "Lname" Then
         .Range(Cells(i, 1), Cells(i, 5)).ClearContents

What's wrong here, please?

Jim



"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
news:4BFD65DA.232559E2@verizonXSPAM.net...
> This kind of syntax is pretty common:
>
>  Range(Cells(i, 1), Cells(i, 5)).ClearContents
>
> But I bet that this syntax isn't doing what you want:
> If Range(Cells(i, 1)).Value = "" Then
>
> I bet you meant:
> If Cells(i, 1).Value = "" Then
>
> If you use:
> If Range(Cells(i, 1)).Value = "" Then
>
> Then cells(i,1) better contain something that looks like an address (or a 
> range
> name).  Otherwise, you'll get a different error.
>
> Since the default property of that cells(i,1) is value, you're doing:
> If Range(Cells(i, 1).value).Value = "" Then
>
> It makes sense if Cells(i,1) contained something like:  b99
> Then your code would be doing:
> if range("B99").value = "" then
>
>
>
>
>
> Jim Berglund wrote:
>>
>> I have been trying to run the following code, and am getting a Next 
>> without
>> For Error
>> Any Ideas?
>>
>> Jim Berglund
>>
>> Sub DelRows()
>>
>> Dim i, n As Long
>> Dim wsNumFrum As Worksheet
>>
>> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
>>           n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
>>                   SearchDirection:=xlPrevious).Row
>>     For i = 1 To n
>>         If Range(Cells(i, 1)).Value = "" Then
>>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>         Else
>>         Range(Cells(i, 1)).Select
>>         If Left(Cells(i, 1), 5).Value = "Lname" Then
>>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>         Else
>>         If IsNumeric(Cells(i, 5).Value) Then
>>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
>>         End If
>>     Next
>>         'Sort the data
>>          ActiveWorkbook.Worksheets("Numbers from Reverse
>> Directory").Sort.SortFields.Clear
>>     ActiveWorkbook.Worksheets("Numbers from Reverse
>> Directory").Sort.SortFields. _
>>         Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, 
>> _
>>         DataOption:=xlSortNormal
>>     With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
>>         .SetRange Range("A1:E5001")
>>         .Header = xlYes
>>         .MatchCase = False
>>         .Orientation = xlTopToBottom
>>         .SortMethod = xlPinYin
>>         .Apply
>>     End With
>>
>> End Sub
>>
>
> -- 
>
> Dave Peterson 

0
Jim
5/26/2010 6:37:42 PM
On Wed, 26 May 2010 11:24:06 -0600, "Jim Berglund" <jazzzbo@shaw.ca> wrote:

>Thanks, Ron. That Worked.
>
>How about this line? It's the last one causing problems...
>       If Left(.Cells(i, 1), 5).Value = "Lname" Then
>
>Jim

I don't see that exact line in what you posted to me.  If the others responses
don't help, post back with more code, and also define the problem.
--ron
0
Ron
5/26/2010 6:43:03 PM
If you're using that with/end with structure, then you'll want to qualify all
those range objects (.range() and .cells()).

      If Left(.Cells(i, 1), 5).Value = "Lname" Then
         .Range(.Cells(i, 1), .Cells(i, 5)).ClearContents

And since I didn't see where you used that with/end with, I'd add it.

Option Explicit
Sub DelRows()

    'this declares iRow as a variant and LastRow as long:
    'Dim i, n As Long
    'you could use:
    'Dim i as long, n as long
    'but I like separate lines:
    
    'I changed the variable names, too
    Dim iRow As Long
    Dim LastRow As Long
    
    Dim wsNumFrum As Worksheet
    
    Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
    
    With wsNumFrum
        'iRow'd include all the parms for the .find command.
        'if you don't, then you'll be getting the parms from the last
        '.find -- either by the user or by some other code.
        LastRow = .Cells.Find(What:="*", _
                        After:=.Cells(1), _
                        LookIn:=xlFormulas, _
                        LookAt:=xlWhole, _
                        SearchOrder:=xlByRows, _
                        SearchDirection:=xlPrevious, _
                        MatchCase:=False).Row
                
        For iRow = 1 To LastRow
            If .Cells(iRow, 1).Value = "" Then
                .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
            Else
                If LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") Then
                    .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
                Else
                    If IsNumeric(.Cells(iRow, 5).Value) Then
                        .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
                    End If
                End If
            End If
        Next iRow

        'Since the code is in the previous with statement, it's
        'kind of equivalent to:
        'with wsNumFrum.sort
        With .Sort
            .SortFields.Clear
            .SortFields.Add _
                Key:=Parent.Range("A1"), _
                SortOn:=xlSortOnValues, _
                Order:=xlAscending, _
                DataOption:=xlSortNormal
            .SetRange .Parent.Range("A1:E5001")
            .Header = xlYes
            .MatchCase = False
            .Orientation = xlTopToBottom
            .SortMethod = xlPinYin
            .Apply
        End With
    End With
End Sub

======
And I think that this portion:

        For iRow = 1 To LastRow
            If .Cells(iRow, 1).Value = "" Then
                .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
            Else
                If LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") Then
                    .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
                Else
                    If IsNumeric(.Cells(iRow, 5).Value) Then
                        .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
                    End If
                End If
            End If
        Next iRow

can use some if/or logic:

        For iRow = 1 To LastRow
            If .Cells(iRow, 1).Value = "" _
             or LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") _
             or IsNumeric(.Cells(iRow, 5).Value) Then
                .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
            end if
        next irow

(Untested, uncompiled.  Watch for typos.)



Jim Berglund wrote:
> 
> OK, Thanks for the explanation. I am down to the short strokes and now have
> only one hiccup left (it may have been missed in a previous note)
> 
>       If Left(.Cells(i, 1), 5).Value = "Lname" Then
>          .Range(Cells(i, 1), Cells(i, 5)).ClearContents
> 
> What's wrong here, please?
> 
> Jim
> 
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> news:4BFD65DA.232559E2@verizonXSPAM.net...
> > This kind of syntax is pretty common:
> >
> >  Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >
> > But I bet that this syntax isn't doing what you want:
> > If Range(Cells(i, 1)).Value = "" Then
> >
> > I bet you meant:
> > If Cells(i, 1).Value = "" Then
> >
> > If you use:
> > If Range(Cells(i, 1)).Value = "" Then
> >
> > Then cells(i,1) better contain something that looks like an address (or a
> > range
> > name).  Otherwise, you'll get a different error.
> >
> > Since the default property of that cells(i,1) is value, you're doing:
> > If Range(Cells(i, 1).value).Value = "" Then
> >
> > It makes sense if Cells(i,1) contained something like:  b99
> > Then your code would be doing:
> > if range("B99").value = "" then
> >
> >
> >
> >
> >
> > Jim Berglund wrote:
> >>
> >> I have been trying to run the following code, and am getting a Next
> >> without
> >> For Error
> >> Any Ideas?
> >>
> >> Jim Berglund
> >>
> >> Sub DelRows()
> >>
> >> Dim i, n As Long
> >> Dim wsNumFrum As Worksheet
> >>
> >> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
> >>           n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
> >>                   SearchDirection:=xlPrevious).Row
> >>     For i = 1 To n
> >>         If Range(Cells(i, 1)).Value = "" Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         Else
> >>         Range(Cells(i, 1)).Select
> >>         If Left(Cells(i, 1), 5).Value = "Lname" Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         Else
> >>         If IsNumeric(Cells(i, 5).Value) Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         End If
> >>     Next
> >>         'Sort the data
> >>          ActiveWorkbook.Worksheets("Numbers from Reverse
> >> Directory").Sort.SortFields.Clear
> >>     ActiveWorkbook.Worksheets("Numbers from Reverse
> >> Directory").Sort.SortFields. _
> >>         Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending,
> >> _
> >>         DataOption:=xlSortNormal
> >>     With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
> >>         .SetRange Range("A1:E5001")
> >>         .Header = xlYes
> >>         .MatchCase = False
> >>         .Orientation = xlTopToBottom
> >>         .SortMethod = xlPinYin
> >>         .Apply
> >>     End With
> >>
> >> End Sub
> >>
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
Dave
5/26/2010 11:10:05 PM
ps.  That code used the syntax from xl2007.  If you have to support xl2003 or
earlier, it won't work for those users.

But it's an easy fix to use the old syntax.

        With .Range("a1:E1501")
            .Cells.Sort _
                key1:=.Columns(1), _
                order1:=xlAscending, _
                Header:=xlYes, _
                OrderCustom:=1, _
                MatchCase:=False, _
                Orientation:=xlTopToBottom
        End With



Jim Berglund wrote:
> 
> OK, Thanks for the explanation. I am down to the short strokes and now have
> only one hiccup left (it may have been missed in a previous note)
> 
>       If Left(.Cells(i, 1), 5).Value = "Lname" Then
>          .Range(Cells(i, 1), Cells(i, 5)).ClearContents
> 
> What's wrong here, please?
> 
> Jim
> 
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> news:4BFD65DA.232559E2@verizonXSPAM.net...
> > This kind of syntax is pretty common:
> >
> >  Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >
> > But I bet that this syntax isn't doing what you want:
> > If Range(Cells(i, 1)).Value = "" Then
> >
> > I bet you meant:
> > If Cells(i, 1).Value = "" Then
> >
> > If you use:
> > If Range(Cells(i, 1)).Value = "" Then
> >
> > Then cells(i,1) better contain something that looks like an address (or a
> > range
> > name).  Otherwise, you'll get a different error.
> >
> > Since the default property of that cells(i,1) is value, you're doing:
> > If Range(Cells(i, 1).value).Value = "" Then
> >
> > It makes sense if Cells(i,1) contained something like:  b99
> > Then your code would be doing:
> > if range("B99").value = "" then
> >
> >
> >
> >
> >
> > Jim Berglund wrote:
> >>
> >> I have been trying to run the following code, and am getting a Next
> >> without
> >> For Error
> >> Any Ideas?
> >>
> >> Jim Berglund
> >>
> >> Sub DelRows()
> >>
> >> Dim i, n As Long
> >> Dim wsNumFrum As Worksheet
> >>
> >> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
> >>           n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
> >>                   SearchDirection:=xlPrevious).Row
> >>     For i = 1 To n
> >>         If Range(Cells(i, 1)).Value = "" Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         Else
> >>         Range(Cells(i, 1)).Select
> >>         If Left(Cells(i, 1), 5).Value = "Lname" Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         Else
> >>         If IsNumeric(Cells(i, 5).Value) Then
> >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >>         End If
> >>     Next
> >>         'Sort the data
> >>          ActiveWorkbook.Worksheets("Numbers from Reverse
> >> Directory").Sort.SortFields.Clear
> >>     ActiveWorkbook.Worksheets("Numbers from Reverse
> >> Directory").Sort.SortFields. _
> >>         Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending,
> >> _
> >>         DataOption:=xlSortNormal
> >>     With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
> >>         .SetRange Range("A1:E5001")
> >>         .Header = xlYes
> >>         .MatchCase = False
> >>         .Orientation = xlTopToBottom
> >>         .SortMethod = xlPinYin
> >>         .Apply
> >>     End With
> >>
> >> End Sub
> >>
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
Dave
5/26/2010 11:14:37 PM
I changed the variable name from i to iRow when I was almost done.

This line:
'iRow'd include all the parms for the .find command.
used to read:
'I'd include all the parms for the .find command.

(there may be more <vbg>.)

Dave Peterson wrote:
> 
> If you're using that with/end with structure, then you'll want to qualify all
> those range objects (.range() and .cells()).
> 
>       If Left(.Cells(i, 1), 5).Value = "Lname" Then
>          .Range(.Cells(i, 1), .Cells(i, 5)).ClearContents
> 
> And since I didn't see where you used that with/end with, I'd add it.
> 
> Option Explicit
> Sub DelRows()
> 
>     'this declares iRow as a variant and LastRow as long:
>     'Dim i, n As Long
>     'you could use:
>     'Dim i as long, n as long
>     'but I like separate lines:
> 
>     'I changed the variable names, too
>     Dim iRow As Long
>     Dim LastRow As Long
> 
>     Dim wsNumFrum As Worksheet
> 
>     Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
> 
>     With wsNumFrum
>         'iRow'd include all the parms for the .find command.
>         'if you don't, then you'll be getting the parms from the last
>         '.find -- either by the user or by some other code.
>         LastRow = .Cells.Find(What:="*", _
>                         After:=.Cells(1), _
>                         LookIn:=xlFormulas, _
>                         LookAt:=xlWhole, _
>                         SearchOrder:=xlByRows, _
>                         SearchDirection:=xlPrevious, _
>                         MatchCase:=False).Row
> 
>         For iRow = 1 To LastRow
>             If .Cells(iRow, 1).Value = "" Then
>                 .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>             Else
>                 If LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") Then
>                     .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>                 Else
>                     If IsNumeric(.Cells(iRow, 5).Value) Then
>                         .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>                     End If
>                 End If
>             End If
>         Next iRow
> 
>         'Since the code is in the previous with statement, it's
>         'kind of equivalent to:
>         'with wsNumFrum.sort
>         With .Sort
>             .SortFields.Clear
>             .SortFields.Add _
>                 Key:=Parent.Range("A1"), _
>                 SortOn:=xlSortOnValues, _
>                 Order:=xlAscending, _
>                 DataOption:=xlSortNormal
>             .SetRange .Parent.Range("A1:E5001")
>             .Header = xlYes
>             .MatchCase = False
>             .Orientation = xlTopToBottom
>             .SortMethod = xlPinYin
>             .Apply
>         End With
>     End With
> End Sub
> 
> ======
> And I think that this portion:
> 
>         For iRow = 1 To LastRow
>             If .Cells(iRow, 1).Value = "" Then
>                 .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>             Else
>                 If LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") Then
>                     .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>                 Else
>                     If IsNumeric(.Cells(iRow, 5).Value) Then
>                         .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>                     End If
>                 End If
>             End If
>         Next iRow
> 
> can use some if/or logic:
> 
>         For iRow = 1 To LastRow
>             If .Cells(iRow, 1).Value = "" _
>              or LCase(Left(.Cells(iRow, 1).Value, 5)) = LCase("Lname") _
>              or IsNumeric(.Cells(iRow, 5).Value) Then
>                 .Range(.Cells(iRow, 1), .Cells(iRow, 5)).ClearContents
>             end if
>         next irow
> 
> (Untested, uncompiled.  Watch for typos.)
> 
> Jim Berglund wrote:
> >
> > OK, Thanks for the explanation. I am down to the short strokes and now have
> > only one hiccup left (it may have been missed in a previous note)
> >
> >       If Left(.Cells(i, 1), 5).Value = "Lname" Then
> >          .Range(Cells(i, 1), Cells(i, 5)).ClearContents
> >
> > What's wrong here, please?
> >
> > Jim
> >
> > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> > news:4BFD65DA.232559E2@verizonXSPAM.net...
> > > This kind of syntax is pretty common:
> > >
> > >  Range(Cells(i, 1), Cells(i, 5)).ClearContents
> > >
> > > But I bet that this syntax isn't doing what you want:
> > > If Range(Cells(i, 1)).Value = "" Then
> > >
> > > I bet you meant:
> > > If Cells(i, 1).Value = "" Then
> > >
> > > If you use:
> > > If Range(Cells(i, 1)).Value = "" Then
> > >
> > > Then cells(i,1) better contain something that looks like an address (or a
> > > range
> > > name).  Otherwise, you'll get a different error.
> > >
> > > Since the default property of that cells(i,1) is value, you're doing:
> > > If Range(Cells(i, 1).value).Value = "" Then
> > >
> > > It makes sense if Cells(i,1) contained something like:  b99
> > > Then your code would be doing:
> > > if range("B99").value = "" then
> > >
> > >
> > >
> > >
> > >
> > > Jim Berglund wrote:
> > >>
> > >> I have been trying to run the following code, and am getting a Next
> > >> without
> > >> For Error
> > >> Any Ideas?
> > >>
> > >> Jim Berglund
> > >>
> > >> Sub DelRows()
> > >>
> > >> Dim i, n As Long
> > >> Dim wsNumFrum As Worksheet
> > >>
> > >> Set wsNumFrum = Worksheets("Numbers from Reverse Directory")
> > >>           n = wsNumFrum.Cells.Find(What:="*", SearchOrder:=xlRows, _
> > >>                   SearchDirection:=xlPrevious).Row
> > >>     For i = 1 To n
> > >>         If Range(Cells(i, 1)).Value = "" Then
> > >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> > >>         Else
> > >>         Range(Cells(i, 1)).Select
> > >>         If Left(Cells(i, 1), 5).Value = "Lname" Then
> > >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> > >>         Else
> > >>         If IsNumeric(Cells(i, 5).Value) Then
> > >>             Range(Cells(i, 1), Cells(i, 5)).ClearContents
> > >>         End If
> > >>     Next
> > >>         'Sort the data
> > >>          ActiveWorkbook.Worksheets("Numbers from Reverse
> > >> Directory").Sort.SortFields.Clear
> > >>     ActiveWorkbook.Worksheets("Numbers from Reverse
> > >> Directory").Sort.SortFields. _
> > >>         Add Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending,
> > >> _
> > >>         DataOption:=xlSortNormal
> > >>     With ActiveWorkbook.Worksheets("Numbers from Reverse Directory").Sort
> > >>         .SetRange Range("A1:E5001")
> > >>         .Header = xlYes
> > >>         .MatchCase = False
> > >>         .Orientation = xlTopToBottom
> > >>         .SortMethod = xlPinYin
> > >>         .Apply
> > >>     End With
> > >>
> > >> End Sub
> > >>
> > >
> > > --
> > >
> > > Dave Peterson
> 
> --
> 
> Dave Peterson

-- 

Dave Peterson
0
Dave
5/26/2010 11:20:31 PM
Reply:

Similar Artilces:

code error 80072EFE
Operating system. vista 64 home premium. Laptop Asus K51ACseries. I have been trying windows update many times. I have gone through different forums to see if there is a fix. My fault code is 80072EFE. I even downloaded and used regcure after a suggestion from forum message. I am about ready to piss off windows altogether in a big way. They just get more complicated and harder to fix faults. Mick I suggest read the solution here: http://social.technet.microsoft.com/Forums/en-US/itprovistaie/thread/0ce7c1e6-7ef2-48e1-b7c9-c8f1e97c71d5 Robin Meng (MSFT) posted a compreh...

CRM 3.0
1. After the installation of CRM we observed that the SRS link reference of the CRM 3.0 is the follow http://localhost/Reportserver. when we tried to open the link we receive the CRM message that cannot open the reports with the retry and cancel buttons. Then we have seen that the reports are really in the port 8080 address"http://localhost:8080/Reportserver" and not port 80. we have proven them all the CRM 3.0 installed reports work well in this address. 2. we change the registry Reg Address: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM] "SQLRSServerURL...

Logarithmic error bar bug
When placing error bars on a column graph with a logarithmic Y axis, the error bar is drawn as a large dark triangle connecting the last bar and it's neighbor. There is an error, something about negative and zero values in logarithmic scales, but there are no such values in the data. Is there a work-around for this? Hi, Send me a copy of the chart and I will look at it when I get home tonight. -- Thanks, Shane Devenshire Microsoft Excel MVP shanedevenshire@sbcglobal.net "Jdoggrr" wrote: > When placing error bars on a column graph with a logarithmic Y axis, the > e...

Store error whith appplication error pop-up
One time a day the store om my exchange 5.5 sp4 give an=20 error , and the servi=E7e shuts down. them i startup the=20 service and the imc shuts and i star=B4t up. Them only in the next day the history repets it selve. Application popup: store.exe - Application Error : The=20 instruction at "0x004246a5" referenced memory=20 at "0x132bf000". The memory could not be "read". Application popup: store.exe - Application Error : The=20 instruction at "0x004246a5" referenced memory=20 at "0x137bf000". The memory could not be "read". Ale...

Excel CSV Error
From our intranet we routinely expose a link to export underlying datasets to excel via Response.ContentType = "application/csv" Response.AddHeader("content-disposition", "filename=fred.csv") This has been successful until recently. One machine now opens the file into 1 column in excel. Base set up: XP, Office 2000 Troubled machine does have SP2. Others SP1. The regional settings appear consistent to working machines. Regional settings English (United States) List separator = "," When he exports a csv file from excel it is comma separated. Any Ideas? ...

Paint error
I have a friend running XP that gets a paint error "Paint has encountered an error and needs to close" Where, in the event viewer, might she find more detail on this error? -- Frank C Dell Inspiron 530S Win Vista Ultimate 64 bit SP1 Dell studio laptop Win Vista Ultimate 64 bit SP1 HP Photosmart D7260 "Frank C" wrote: > I have a friend running XP that gets a paint error "Paint has encountered an > error and needs to close" > Where, in the event viewer, might she find more detail on this error? > > -- > Frank C > ...

SQL error message
Hello, I am using the following code. The code is programmed to pull a mileage expense rate from a table called "ExpenseMileageRate" (the fields are 'Rate' and 'EffectiveDate' and use it to calculate the currency amount. As the rate changes, I need the code to lookup the rate that was in effect on the date of the expense and use it on several forms. Some of the forms are historical lookups, so I don't want them all to lookup the amount currently in effect, but the rate that was in effect on the date of the expense. I am getting and error after the FROM and be...

Client install error 04-11-07
I am installing the CRM client software. The install went fine on the other two laptops. I am getting the following messages on one laptop. MSDE Service Pack 4 Missing Minimum version 8.00.818. click Install Installation starts Installation Failed If I click Back and attempt it again the install fails. Please advise. cheers, Michael Try the latest version of CRM Outloo Client. It's comes with SQL 2005 Express Edition. It's more stable than the one comes with MSDE 2000. "Michael P. Lindekugel" <MichaelPLindekugel@discussions.microsoft.com> wrote in message news:...

Sharing calendar in Office 2003 without Exchange
We have a small group of about six computers, all running Office 2003. We would like to be able to share a common calendar, be able to edit it, and have the other users be able to see it in near real time. The application does not warrant the expense of purchasing and installing MS Exchange server. Is there any way to do this without Exchange and on a budget? Thanks, Kevin Kevin <kevinb@joink.com> wrote: > We have a small group of about six computers, all running Office > 2003. We would like to be able to share a common calendar, be able to > edit it, and have the oth...

eseutil error #2
in Exchange 5.5, I tried to compact with eseutil /d /ispriv, and it failed with Duplicate Key error. Is there anything I can do? I'm tring to solve that 99% store.exe cpu issue. Besides that, everything still seeems to be working. there are several gig of white space. If the store is not big, you might try to exmerge data out, delete priv.edb, create new priv.edb, then exmerge the data back. Then you try to use eseutil /d "dlw" wrote: > in Exchange 5.5, I tried to compact with eseutil /d /ispriv, and it failed > with Duplicate Key error. Is there anything I c...

Error
I am trying to do a reinstall of CRM 1.2 onto an SBS2k3 box. In the uninstall of CRM I left the databases intact as I will be reconnecting the new CRM 1.2 installation to the existing data. When I try the install, I get an error saying : Microsoft CRM Setup could not validate this instance of SQL Server at the "Select SQL Server" screen. I have selected the SQL server from the list (which is local to the machine) and have "Connect to existing databases" (though I get the same error if I select "create new databases"). I saw the previous thread about SQL requi...

Unhandled Exception Error creating users
Hi Guys I have a strange error occuring after moving a pdc in my dev environment. CRM is happy and working on all levels except ..... When adding a user I get an unhandled exception error. I am struggling finding anything similar through the usual google channels on this. To add a few details Web site is definately running in .net 1.1 I can update an existing user I can create other records in the system (case, account, contact etc) Interestingly we had a working import comonent using the sdk which now gives an error on creating users of 'Access is denied) My suspicions would be...

Money 99 Investments error decimals rounded
Hi all I've be using Money 99 since several years, but nowadays I bought a new computer and a problem arised. In the past, I was able to capture the price of my stocks with no problem, but now when I try to do it Money don't respect my decimals. It turns the number rounded. For example, if I capure 3.45 as the price of the stock, the software changes it to 3.00. In the other hand, when I caputre this 3.45 as a cost of any expense (in the accounts of banks or similar), I don't get this problem. So I don't think that this problem is caused by the new windows plataform wh...

Access XP Import (from Excel XP) Errors
I am using Excel XP to import a single sheet to Access XP. Every single time I get this error: "The wizard is unable to access information in the file '<pathname>'. Please check that the file exists and that the file is in the correct format." The cause is not an ISAM issue as I checked the files and registry entries for same as suggested in Knowledge Base #209805; 283881; 90111; and 142473. My work-a-round is to export from Excel to a text file, then to import that text file into Access. This is the long way around the barn. Also, where can I obtain a comp...

error #4
I get the following error when entering a P.O.: "Credit limit option in the vendor Maintenance options windows for this vendor is No Credit. You can't enter purchasing order processing transactions for this vendor". Can I get help in solving this please? I'm new with Great plains. This setting is in the vendor Card. Cards-Purchasing-Vendors On the options button on the main form, there is a credit limit field. It appears that it is set to "No-Credit" on this vendor. Set that field appropriately and this will solve your problem "Rafael" wrote: &...

Shut down error message.........
When I shut down my computer it displays an error message. Something about a file is malfunctioning. It gives a Hexadecimal number. It closes too fast to read fully. Is there a file in the computer that shows the actions the computer goes through when it shuts down? Thanks FDLeyda "Frank Drew Leyda" <mymail@nothere.com> wrote in message news:%23UUqy5j5KHA.5808@TK2MSFTNGP02.phx.gbl... > > When I shut down my computer it displays an error message. > > Something about a file is malfunctioning. > > It gives a Hexadecimal number. ...

error message: could not start the MS exchange Internet Mail Service service
Hi, I have a problem yestersday and it failed the exchange server. I noticed this maybe related to the virus but I'm not sure. Here is the message I got after I attempted open the exchange server: nav for ms exchange failed to start I already use the scan tool and make sure there is no virus in the server. when I opened up "services" I found "NAV for Microsoft Exchange" cannot be started automatically and that caused both "MS exchange Internet mail service" and "MS exchange information store" cannot start. There was a lot of virus came thr...

Error message #82
I get the following message: The file msfsmenu.ecf or msfsprop.ecf is missing or is not valid. I have tried the detect repair and reinstalling outlook. I am using outlook 2000. Does anyone have any ideas? Can't get my email. ...

Formula needed for Sum(A1:C1) then Sum(D1:F1) in next cell
I am converting a monthly revenue table to a quarterly revenue table. I would like to add A1:C1 and put it the result in a new cell and then autofill the cell to the right of it so that it automatically adds D1:F1 for the next value A B C D E F 1 Jan Feb March April May June 2 10 12 12 13 14 15 Qtr1 Qtr 2 Qtr 3 sum A2:C2 Sum D2:F2 Etc... using autofill currently using autofill the first qtr is correct "=Sum(A2:C2) but the next cell gets filled with "=sum(B2:D2) instead of addi...

LDAP Error
Hey, I got my exchanger server up and running, but when i tried to set up my outlook 2003, I keep on getting this error message when i try access my address book (LDAP) Title: "Microsoft LDAP Directory" Message: "No such object. Possibly your specified Search Base is invalid." then second message saids; Title: "Microsoft Office Outlook" Message: "The action could not be completed." Please help Thanks It sounds like someone set up a LDAP address book instead of an Outlook Address Book. Check that on the properties of the profile. -- Matthew Ti...

application defined or object defined error on form
I have 2 forms. My main form which has a button to open another form(search form) and be able to select the customer that is to be viewed. I actually didn't create this form, a co-worker did and they are new to it. Well they renamed the form, table etc. It looks as if everything is changed correctly but for some reason my search form is erroring out. Not sure if it's because of the name change or something else. This selection worked before until this name change. So, On my search form, you can select a customer and click on the select button, which has this logic: varID = M...

Error 1706. No valid source could be found for the product Microso
Office 2000 SP3 Windows XP Home SP2 Symantec AV Corporate Using an AUTHENTIC Office 2000 Pro CD, the error appears. When opening Excel 2000, the Windows Installer appears. Scanned for virues, none found. No spyware per Spybot & Microsoft's AntiSpyware program. Thanks for your help. WC ...

setting up an account without payment plan????????????
How do you set up an account for a bill without setting up a payment plan??? I am lost on this program>??? Just say no when it asks about setting up a bill. We aren't talking about a loan account, are we? "heide" <heideolson@yahoo.com> wrote in message news:052701c37bcf$aef38ef0$a301280a@phx.gbl... > How do you set up an account for a bill without setting > up a payment plan??? I am lost on this program>??? ...

How to disable the "Rules in Error" pop-up in Outlook 2003
Hi all, I used to set dozens of rules for filtering my emails, delete or dispatch them to specific directories and it used to working fine for years till last week. Now, for a reason I ignore (and I have no time to investigate !), I get 10 to 20 "Rules in Error" pop-up per days. The strange thing is the rules seem to work fine anyway because the filtered email are destroyed as requested in the rule. The bad thing is I have to click on the "Close" button if I want the pop-up to disappear. If I have 20 stacked pop-ups and even more (one hundred if I get back from holidays), ...

Debug Error
Using Outlook 2002 - Trying to open get a X Debug Error - Abnormal Program Termination - Retry to Debug - when click on retry it aborts. Any suggestions as to what this could be? Thanks in advance. Jo ...