![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
Problem statement : I have one MS Excel workbook in which one sheet has a column called "Function Name". That column stores the function names. Those functions vb script functions and are defined in one external .vbs file. Now I am writing a driver script (.vbs file) which will open that excel sheet and read that column to get function name and then call the correcponding function. I am having trouble to call a vb function whose name itself is a variable that gets filled in at run time after reading the excel sheet. Here is the code snippet. ----------------------------------------------------------- Set objExcel = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open("C:\Project\Company\Contro ller\input.xls") intRow = 2 functionName ="test1" Do Until objExcel.Cells(intRow,1).Value = "" if ((objExcel.Cells(intRow, 4).Value = "Y") Or (objExcel.Cells(intRow, 4).Value = "Yes")) then functionName = objExcel.Cells(intRow, 3).Value Wscript.Echo (functionName) Call functionName 'This line throws error end if intRow = intRow + 1 Loop objExcel.Quit ----------------------------------------------------------- I know how to call a function defined in some other .vbs file, but problem is how to call a function whose name itself is a variable. Any help would be highly appreaciated. Thanks Rabi |
|
This ad is part of our Revenue Sharing program |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free 1 GB Space + 30 GB Bandwidth with Windows/Linux Reseller Hosting | contactsonia | Hosting Forum | 1 | 10-11-2008 11:54 AM |
| Problem opening up Windows explorer from a web page with vbscript | justsaynik | ASP & VBScript Forum | 0 | 11-02-2007 12:34 PM |
| windows trouble. | detoam | Webmasters Lounge/General Chat | 4 | 02-24-2007 07:53 AM |