I am having difficulty getting my VBA to run the worksheet function correctly. I have tried making all sorts of modifications with no luck. Below is an example of one of my many failed attempts. It reads fine down to the line were it calls the worksheetfunction.slope and spits out a "Run-time error '1004': Application-defined or object-defined error". I can get the function to work fine in the worksheet (Using "=SLOPE(Table1[@[-13.78]:[0.00]],1*Table1[[#Headers],[-13.78]:[0.00]]") but I need to call it through VBA and loop through the corresponding column and rows.
Please Login or Register to view this content.
Bookmarks