VBA Macro not working in Mac

Rkhandelwal1988

New Member
Joined
Jun 4, 2015
Messages
3
Macro is working in my Laptop.However same macro when my client is trying from Mac. It doesnt work :(.

Showing Error Run-time error "1004" Aplication defined or obeject defined error

Kindly suggest me what to do.

Thanks and Regards,
RK
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,067
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
You need to post your code and tell us which line causes the problem. (there is not 100% compatibility between Windows and Mac versions of VBA)
 

Rkhandelwal1988

New Member
Joined
Jun 4, 2015
Messages
3
You need to post your code and tell us which line causes the problem. (there is not 100% compatibility between Windows and Mac versions of VBA)



Below is the code i am using and it got stuck in starting delimit macro only (highlighted line).


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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,534
Messages
5,596,734
Members
414,093
Latest member
Tegglet

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
Top