Syntax Error after update

ricardoacevedo

New Member
Joined
Mar 17, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I just updated one of the two computers I use and my daily use macro now has a SYNTAX ERROR. It works fine on the computer that has not been updated.

Here is the complete Macro it highlights the following as the error

.Type("$A$1:$AC$37613"). Index := 25, Item := Array("canceled","closed", _
"complete","courier","delivered_fail","entregado_cliente","Enviado_A_Tienda", _
"holded","Incomplete","inPacking","listo_retiro","packing","pendiente_retiro", _
"ready_ship","ready_to_ship","="), Count := xlFilterValues

VBA Code:
Sub Marzo17()
'
' Marzo17 Macro
'

'
    Range("Y1").Select
    .Type("$A$1:$AC$37613"). Index := 25, Item := Array("canceled","closed", _
        "complete","courier","delivered_fail","entregado_cliente","Enviado_A_Tienda", _
        "holded","Incomplete","inPacking","listo_retiro","packing","pendiente_retiro", _
        "ready_ship","ready_to_ship","="), Count := xlFilterValues
    Rows("18:18").Select
    Range("J18").
    Type(, .(xlDown)).Select
    .  := xlUp
    .(xlToLeft).Select
    .(xlUp).Select
    .(xlUp).Select
    .(xlUp).Select
    .Item
    Columns("A:A").Select
    .  := xlToLeft
    Columns("F:F").Select
    .
    Columns("B:B").Select
    .  := xlToRight
    Columns("C:C").Select
    .  := xlToRight,  := xlFormatFromLeftOrAbove
    .(xlUp).Select
    .(xlToRight).Select
    .(xlToRight).Select
    Columns("Z:Z").Select
    .
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    .(xlToLeft).Select
    Range("C1").Select
    .GapWidth
    Columns("T:T").Select
    .
    Columns("E:E").Select
    .  := xlToRight
    Columns("Q:Q").Select
    .
    Columns("F:F").Select
    .  := xlToRight
    Columns("Y:Y").Select
    .
    Columns("G:G").Select
    .  := xlToRight
    Columns("U:U").Select
    .
    Columns("H:H").Select
    .  := xlToRight
    Columns("AC:AC").Select
    .
    Columns("I:I").Select
    .  := xlToRight
    Columns("M:P").Select
    .
    Columns("J:J").Select
    .  := xlToRight
    .(xlToLeft).Select
    .(xlUp).Select
    Range("A1:M1").Select
    Range("M1").
    With .SortMethod
        .WhichAddress = xlSolid
        .ActiveSheet = xlAutomatic
        .ActiveSheet = 65535
        .PercentMin = 0
        .Placement = 0
    End With
    Range("B2:D2").Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Move. = 1048553
    Move. = 1046136
    Move. = 1036472
    Move. = 947080
    Move. = 814199
    Move. = 775542
    Move. = 628165
    Move. = 591925
    Move. = 415556
    Move. = 374483
    Move. = 207778
    Move. = 178786
    Move. = 118385
    Move. = 111137
    Move. = 89393
    Move. = 48321
    Move. = 41073
    Move. = 7249
    Move. = 1
    Columns("B:B")..
    Columns("D:D")..
    Range("J2:M2").Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Type(, .(xlDown)).Select
    Range("J1048555").Select
    .(xlToLeft).Select
    .(xlUp).Select
    .(xlUp).Select
    .(xlUp).Select
    .(xlUp).Select
End Sub

Thanks in advance.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
When I paste your code I get dozens of syntax errors, most of the code actually. I cannot make sense out of most of this code, and I cannot imagine how it could be running on any machine at all. I think you need to scrub this down better before troubleshooting the line you're asking us about.

The line you are asking about starts with a dot which makes no sense without a With statement. Even if you had a With statement, there is no built-in object with a method called Type. Even if there were, you have a dot after the ")" which makes no sense.

Also:
You have no With statements but you have several lines that start with a dot
You have many lines that have just a dot and nothing else
You have lines like this that mean nothing at all:
VBA Code:
    .  := xlToRight

compile1.JPG

compile2.JPG
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top