I have a spreadsheet in which I use a UDF to calculate Customer Price. My code is:
Sheets("Parents2").Range("F2").Formula = "=CalCustomerPrice(E2)"
Range("F2").Select
Selection.autofill Destination:=Range("F2:F" & ParentRows)
If I step through this code, it works perfectly, but if I execute it, only F2 contains the correct content. The other cells in Col F are blank. No error message. ParentRows has a value of 233.
Is there any non-mystical explanation for this behavior?
Thanks,
Michael Trombetta
__._,_.___
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar