From: PeteCresswell on 18 Sep 2007 09:07 Thanks James. Thanks Tom. Between the two of you, I think I'm going to be home free by COB. ------------------------------------------------------------------------ James: By some miracle, when I un-wrapped the code it worked right out of the box. Numbers are a little off vis-a-vis Excek, but that's just some digging on my part. Tom: First I tried Application.Run with just .AddIns("Analysis ToolPak").Installed = True and, of course, it threw an error - something like "Macro not found". Then I did it your way all the way with .RegisterXLL and it seemed to find the "MDURATION" macro - albeit returning an Error 2015. Once I figure out what that means, I might be up and running via Excel. ----------------------------------------------------------------------- I'll put a couple hours into Tom's Excel route in hopes of not re- inventing the MDURATION wheel. If that doesn't work, I'll start tweaking James' code. Again, my heartfelt thanks to you both!!!
From: Tom Wickerath AOS168b AT comcast DOT on 18 Sep 2007 13:26 Hi Pete, Make sure you submit valid dates to the function. I was able to generate Error 2015 using this example, with an invalid date: ?MDURATION_Excel("1/1/2008l", "1/1/2016", 0.08, 0.09, 2, 1) Tom Wickerath Microsoft Access MVP https://mvp.support.microsoft.com/profile/Tom http://www.access.qbuilt.com/html/expert_contributors.html __________________________________________ "PeteCresswell" wrote: > Thanks James. > > Thanks Tom. > > Between the two of you, I think I'm going to be home free by COB. > ------------------------------------------------------------------------ > James: > By some miracle, when I un-wrapped the code it worked right out of > the box. > Numbers are a little off vis-a-vis Excek, but that's just some > digging > on my part. > > Tom: > First I tried Application.Run with > just .AddIns("Analysis ToolPak").Installed = True and, of course, > it threw an error - something like "Macro not found". > > Then I did it your way all the way with .RegisterXLL and it seemed > to find > the "MDURATION" macro - albeit returning an Error 2015. > > Once I figure out what that means, I might be up and running via > Excel. > ----------------------------------------------------------------------- > > I'll put a couple hours into Tom's Excel route in hopes of not re- > inventing > the MDURATION wheel. If that doesn't work, I'll start tweaking James' > code. > > Again, my heartfelt thanks to you both!!!
From: (PeteCresswell) on 18 Sep 2007 14:01 Per Tom Wickerath <AOS168b AT comcast DOT net>: >Make sure you submit valid dates to the function. I was able to generate >Error 2015 using this example, with an invalid date: > >?MDURATION_Excel("1/1/2008l", "1/1/2016", 0.08, 0.09, 2, 1) Good catch. I also trapped out when I specified a maturity date that proceeded the settlement date..... but that's what error checking and validation are for.... -) -- PeteCresswell
From: (PeteCresswell) on 18 Sep 2007 14:05 Per Tom Wickerath <AOS168b AT comcast DOT net>: >I was able to generate I'm also getting rather large diffs from Bloomberg for some regular bonds and for callable bonds. Once I survive the 16:30 meeting that's coming up, first thing I'll do is double check that we're feeding the same stuff to Bloomie and my little routine. Then I think I'll play with James' code tonite and see what kind of diffs I come up with there - the hoped-for advantage being the ability to maybe deal with a wider range of possibilities than Excel's function can. -- PeteCresswell
From: Tom Wickerath AOS168b AT comcast DOT on 18 Sep 2007 14:14 I forgot to mention that the Error 2015 was the return value from calling the function; my ProcError error handling code was never invoked. Did you get my code to work without generating any errors? (It works on my PC, using Windows 2000 SP-4 with Access 2003 unpatched). Tom Wickerath Microsoft Access MVP https://mvp.support.microsoft.com/profile/Tom http://www.access.qbuilt.com/html/expert_contributors.html __________________________________________ "(PeteCresswell)" wrote: > Per Tom Wickerath <AOS168b AT comcast DOT net>: > >Make sure you submit valid dates to the function. I was able to generate > >Error 2015 using this example, with an invalid date: > > > >?MDURATION_Excel("1/1/2008l", "1/1/2016", 0.08, 0.09, 2, 1) > > Good catch. I also trapped out when I specified a maturity date > that proceeded the settlement date..... but that's what error > checking and validation are for.... -) > -- > PeteCresswell
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Access XP & Source Safe Next: Access 2003 Crashing after sp3 update |