Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Passing value to Public Function (Excel) to find elsewhere
I'm trying to create the following macro to automate calculations in a spreadsheet.
Enter certain value in excel cell... this value then gets passed to a Public Function (as a Variant/String, right?)
Within the public function, the looped find method (from Help files) is used to find this passed variable in another worksheet.
The problem is that if something is passed to the function, the find method always finds nothing. At first I thought, maybe, there was some discrepancy between what was being passed and the results I'd be searching through, but no... even if I search for an internally defined variable (not the one I am passing) it fails to work... Remove the passing, and bham, it works like a charm...
Why would this be the case? is the Find method only for non-public functions? If so, or whatever, is there another way that I might do this?
Thanks a lot!
0 · ·