Hi. I am new to visual basic. I have written a function for Excel 2003 that will put a value into another cell. I have written the function and put it into Module1 so that I have access to the function from Sheet1. I do have macros enabled. This function shows up under the function list, but will not run from Sheet1 and gives me an error of #Value!. If I goto the visual basic script editor (the code page) and hit run at the top of the screen, the function works fine. If I remark out the Range ("f4") line, the function will then work fine from Sheet1. I also saved the Excel file as a .xlsm file.
I have searched all over the internet on this and cannot find a solution. Just partial code, which does not run in my function.
Does anyone have any advice on this? In Sheet1 cell f6, I put = myFunWriteData().Here is the function code:
Please Login or Register to view this content.
Bookmarks