VBA not working for MAC

Finalfight40

Active Member
Joined
Apr 24, 2018
Messages
273
Office Version
  1. 365
Platform
  1. Windows
Hi All

I am having an issue where i have a line for a macro which works for PC but not on mac.

The lines provided i'm pretty sure are causing the issue:

Code:
Set LookUpDate = ActiveCell
On Error GoTo DateNotFound1
Rows(ActiveCell.Row).Cells.Find(What:=LookUpDate, After:=ActiveCell, LookIn:= xlValues, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate

Even tho the date is 11/06/2018 and is there, it will go straight to the error handling.

However when i replace LookUpDate in the find section, with "11/06/2018", it works. Can anyone advise me on this?

(Would copy and paste the vba from the MAC but cant access the internet from it at the moment so is typed out)
 
Hi Mark

That did not work either.

I have just double checked and it definitely works on my PC.

If it would help to upload my workbook, i am happy to do so but could someone please let me know the best way to go about this.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Also when removing the on error go to line i get:

run-time error 91

Object variable with block variable not set
 
Last edited:
Upvote 0
What happens if you change the CLng to CDate?
I won't be able to check the file as don't have a MAC in front of me today but you can upload the file to a free file hosting site like www.dropbox.com or www.box.com, Mark it for sharing and then post the link it provides in the thread and I am sure someone will look at it.
 
Upvote 0
What happens if you change the CLng to CDate?
I won't be able to check the file as don't have a MAC in front of me today but you can upload the file to a free file hosting site like www.dropbox.com or www.box.com, Mark it for sharing and then post the link it provides in the thread and I am sure someone will look at it.

Hi Mark

It still brings up the same error message.
 
Upvote 0
The macro results that are displayed in the second sheet "Summary" are from when i ran it from a PC and are correct.

However these results are different to when i would run it from a MAC.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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