Forum Discussion
JGB82
Jan 11, 2023Copper Contributor
UDF not working in Excel 365
I have made a new funcion via VBA and put it in its own module, so not in the workbook or something, I made a new module. It's a function for giving back the background color code of a selected cell...
HansVogelaar
Jan 11, 2023MVP
Are you sure that you created the module in the workbook where you want to use the UDF?
- JGB82Jan 11, 2023Copper Contributor
HansVogelaar No I made a new module. I did it the exact same way in excel 2016 and it's working there. Even if I e-mail the 2016 version to myself and open it in 365 it stops working.
- JGB82Jan 11, 2023Copper Contributor
These are my settings for allowing Macro's.
I have also tried accepting all Macro's but that doesn't change anything.
- HansVogelaarJan 11, 2023MVP
Try making the folder containing the workbook a Trusted Location for Excel:
- Select 'Vertrouwde locaties' in the Vertrouwenscentrum dialog.
- If your workbook is stored in a network folder, tick the check box 'Vertrouwde locaties in mijn netwerk toestaan (niet aanbevolen)'.
- Click 'Nieuwe locatie toevoegen...'
- Click Bladeren, select the folder of the workbook, then click OK.
- Quit and restart Excel to be on the safe side.
- Reopen the workbook.
- HansVogelaarJan 11, 2023MVP
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me. Thanks in advance.
- JGB82Jan 11, 2023Copper ContributorSend!