Consulting

Results 1 to 4 of 4

Thread: Runtime Error 438

  1. #1

    Runtime Error 438

    I have created a VBA script that works perfectly fine on my system, but when i run it on my colleagues system it starts working but stops at the point highlighted in bold below. the error is 438.

    Range("A10:H13000").Select
    ActiveWorkbook.Worksheets("PASSPORT_BANK").SORT.SortFields.Clear
    ActiveWorkbook.Worksheets("PASSPORT_BANK").SORT.SortFields.Add2 Key:=Range( _
    "D10: D12609"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
    xlSortNormal

    ActiveWorkbook.Worksheets("PASSPORT_BANK").SORT.SortFields.Add2 Key:=Range( _
    "B10:B12609"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
    xlSortNormal
    With ActiveWorkbook.Worksheets("PASSPORT_BANK").SORT
    .SetRange Range("A9:H12609")
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With

  2. #2
    Hi & welcome to the board.
    Change Add2 to Add both times it appears.

  3. #3
    Working perfectly thank you

  4. #4
    You're welcome & thanks for the feedback

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •