VBA Macro Working in Windows but showing error in Mac

Rkhandelwal1988

New Member
Joined
Jun 4, 2015
Messages
3
i have below macro which i recorded in windows and working perfectly fine. But when my client is trying to use it from MAC, it doesnt work. Showing error message "Run-time error "1004" Aplication defined or obeject defined error".

Please let me know why this is happening and what can i do to make it work.

Thanks !
Sub Macro1()
Application.DisplayAlerts = False


Range("A1:A301").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:= _
"(", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True

Range("B1:B301").Select
Selection.TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:= _
")", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True





Range("i1:i301").Select
Selection.TextToColumns Destination:=Range("i1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:= _
"(", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True

Range("j1:j301").Select
Selection.TextToColumns Destination:=Range("j1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:= _
")", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True





Sheet3.Select
Range("S2:V301").Select

Selection.Copy
Sheet1.Select
Range("A5").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False





Sheet1.Range("C5:D304").Select
With Selection
Selection.NumberFormat = "General"
.Value = .Value
End With


Sheet1.Range("A4:D304").Select
ActiveWorkbook.Worksheets("Output").Sort.SortFields.clear
ActiveWorkbook.Worksheets("Output").Sort.SortFields.Add Key:=Range("C5:C304") _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("output").Sort
.SetRange Range("A4:D304")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With








Application.DisplayAlerts = True




End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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