Hello Dear You can access excel function from vba code. here is the example
Syntax : ActiveCell.FormulaR1C1 = "=Here your function,What you want to Access" Example ActiveCell.FormulaR1C1 = "=SUM(R[1]C[1],R[2]C[1],R[3]C[1],R[4]C[1],R[5]C[1])" Hope it Will Help Happy to Help :) Shyam On Tue, Mar 23, 2010 at 1:01 AM, Vinod Menon <anuragme...@gmail.com> wrote: > Hello, > > I am able to use these functions in the worksheet itself, but not able > to use them in a VBA macro in the same. I get an error that Object > doesn't support this property or method. This method, however, seems > to work on Excel2007. Does Excel2003 not support using this from VBA ? > Is there any other step needed to ensure that the WorksheetFunctions > that can be used in the worksheets can also be called from VBA > functions? > > u0 = WorksheetFunction.Dec2Hex(WorksheetFunction.Hex2Dec(u), 3) > > This above line works in the same macro used on Excel2007. But not on > Excel2003. > > > Any help is greatly appreciated. > > -Vinod > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our Facebook Group @ > http://www.facebook.com/group.php?gid=287779555678 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,800 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > > To unsubscribe from this group, send email to > excel-macros+unsubscribegooglegroups.com or reply to this email with the > words "REMOVE ME" as the subject. > -- Thanks Regards Shyam Software Engineer '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' When one door of happiness closes, another opens; but often we look so long at the closed door that we do not see the one which has been opened for us. - Helen Keller '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Wenn eine Tür des Glücks schließt, öffnet sich ein weiteres, aber oft schauen wir so lange auf die geschlossene Tür, dass wir nicht sehen ein, die für uns geöffnet wurde. - Helen Keller '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe To unsubscribe from this group, send email to excel-macros+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.