Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50158

Need Help with Macro Compile Error

$
0
0
I have Excel 2016 and I export a list of checks from my accounting program. I recorded a macro to make the adjustments to the file - formatting, columns, etc. I had no problem in an older version of Excel with this, but now in Windows 10 and Excel 2016 when I record it fresh, I am getting an error message when I try to run it. So far it's highlighting the first line which looks like it's where I select the header row and delete it. Then I insert a column in A1 and put in my Routing number and copy it down, then I format the date and add a column for the code 320. That's pretty much it.

I don't understand what the problem is.

Code:

Sub Fraud()
'
' Fraud Macro
'
' Keyboard Shortcut: Ctrl+Shift+J
'
    Rows("1:1").Select
    .  := xlUp
    Columns("A:A").Select
    .Accelerator  := xlToRight,  := xlFormatFromLeftOrAbove
    Range("A1").Select
    . = "1111111111"
    Range("A1").Select
    .  := Range("A1:A17")
    Range("A1:A17").Select
    Columns("E:E").Select
    . = "$#,##0.00;[Red]-($#,##0.00)"
    Columns("F:F").Select
    .Accelerator  := xlToRight,  := xlFormatFromLeftOrAbove
    Range("F1").Select
    . = "320"
    Range("F1").Select
    .  := Range("F1:F17")
    Range("F1:F17").Select
    Columns("F:F").Select
    . = "0_);[Red](0)"
    Columns("D:D").Select
    . = "mm-dd-yyyy"
    Name.Rows
    DisplayRightToLeft("PERSONAL.XLSB").
    Name.Rows
End Sub

If you have any ideas to figure out why it's giving me syntax errors THANK YOU for sharing! :)

Carla

Viewing all articles
Browse latest Browse all 50158

Trending Articles