Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Differences between PC & Excel for Mac VBA
Post Body

This is driving me insane. I have a spreadsheet that I need to be compatible between regular Excel and Excsel for Mac 2011. The mac that I'm using for testing refuses to throw errors, and just locks up. I've tried various things to troubleshoot this behavior, but it doesn't seem to be the install of the program that is causing issues.

A couple things that I have narrowed down:

  • Application.EnableEvents. When turning it back on, Excel freezes.

  • Unprotecting a locked sheet

The only other thing I'm doing with VBA is sorting using AutoFilter and SortFields, like this:

With ws
    .Range("$A$1:$P$" & TheLastRow).AutoFilter Field:=5
    .Range("$A$1:$P$" & TheLastRow).AutoFilter Field:=5, Criteria1:= _
        "Charges"
    .AutoFilter.sort.SortFields.Clear
    .AutoFilter.sort.SortFields.Add(Range( _
        "N1:N" & TheLastRow), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color _
        = RGB(255, 199, 206)
End With
With ws.AutoFilter.sort
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
End With

And updating PivotTables like this:

For Each pt In ws.PivotTables
    With pt
        .ClearAllFilters
    End With
Next pt

With ws
    .PivotTables("Pivot1").PivotCache.Refresh
    .PivotTables("Pivot2").PivotCache.Refresh
    .PivotTables("Pivot3").PivotCache.Refresh
    .PivotTables("Pivot4").PivotCache.Refresh
End With

With ws.PivotTables("Pivot1")
    .PivotFields("reason-long").PivotItems("").Visible = False
    .PivotFields("disposition").CurrentPage = "Sold"
End With

With ws
    .PivotTables("Pivot1").PivotFields("reason").PivotItems("(blank)").Visible = False
    .PivotTables("Pivot2").PivotFields("reason").PivotItems("(blank)").Visible = False
    .PivotTables("Pivot3").PivotFields("reason").PivotItems("(blank)").Visible = False
End With

But I don't see why this code would cause any problems. Any ideas?

Author
Account Strength
0%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
179,255
Link Karma
41,147
Comment Karma
136,843
Profile updated: 6 months ago
Posts updated: 10 months ago
2

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago