![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: Calling excel function Wolf Grossi schrieb: Quote: > Hi folks, > > having my first experience with Microsoft Office Excel 2007 and > VisualBasic, I'm running into the folowing problem: > > Script test1.vbs opens TEST1.xls. > In test1.vbs I want to execute the excel function GenX: > GenX as listed in Visual Basic Object catalog: > Public Function GenX(rngData As Range, rootNode As String) > Element of VBAProject.ConvX > > > test1.vbs: > --- > Dim objExcel > Dim objWorkBook > Set objExcel = CreateObject("Excel.Application") > objExcel.Visible = True > Set objWorkBook = objExcel.Workbooks.Open("C:\TEST1.xls") > Set objSheet = objWorkBook.ActiveSheet > Msgbox("excel ActiveSheet=" & objWorkBook.ActiveSheet.Name) > objExcel.ConvX.GenX objExcel.Range("$A1:$q333"), "formX" > objExcel.Quit() > --- > > The line 'objExcel.ConvX.GenX ...' throws an error and I have no idea of > how to call the fuction 'GenX' > > - How can I call the function GenX? > - What is the correct syntax to do so? > > If I use 'VBAProject.ConvX.GenX ...' > it throws the error 'Object required VBAProject'. > - Do I have to create an object out of VBAProject? > > > > Thanks for reading and hints! > Wolf objExcel.Run "GenX", objExcel.Range("$A1:$q333"), "formX" |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Calling excel function On Jul 29, 8:27*am, Wolf Grossi <w...@xxxxxx> wrote: Quote: > [snip] > > > Quote: > > * objExcel.Run "GenX", objExcel.Range("$A1:$q333"), "formX" > Many thanks! you saved my afternoon ![]() > > Have a nive day > Wolf OldDog |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Calling function from script | PowerShell | |||
| Call depth reached when calling function | PowerShell | |||
| Calling Excel PMT from VBScipt vs. PowerShell... | PowerShell | |||
| Problems calling a function | PowerShell | |||
| calling imapi2 function put_MultisessionInterfaces return error | Vista General | |||