Doing telnet from excel VBA?

Is it possible to do 'telnet' from excel VBA? The code should get host name/server ip , then username and password from the user. After, it will telnet to the server by providing the username and password...
It should execute some commands in the server too...
Any help appreciable

Hi,
For coding issue, you can ask the question in the Excel for Developers forum:
http://social.msdn.microsoft.com/Forums/en/exceldev/threads
Best Regards,
Sally Tang

Similar Messages

  • How to call a labview dll from excel-VBA?

    How to call a simple Labview DLL from Excel VBA?
    I have seen examples of DLL calls from VB but does it work the same way for VBA? I have 2000 excel and Labview 8.5. I created the DLL and tried to call it from VBA using the same type of code as in NI's website example(ofcourse its a bit diff with 8.5)
    http://zone.ni.com/devzone/cda/tut/p/id/...
    BUT it errors out when called from excel
    ERROR: The object invoked has disconnected from its client

    You would need to provide more details about the LabVIEW DLL, such as the prototypes of the functions (VIs) that you're trying to call, and your actual VBA code. Specifically, what object you're trying to create. You should also make sure the Run-Time Enginer is installed, as well as any required libraries such as the VISA Run-Time if you're using VISA. Have you made sure to enable the ActiveX server for the DLL?
    A search yielded the following items that you may wish to peruse:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=261345&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=45099&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=299209&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=170&message.id=195846&requireLogin=False

  • Acrobat 9.0 Standard. Setting PDF file password from Excel VBA

    Acrobat 9.0 Standard. Setting PDF file password from Excel VBA
    Hi: I am trying to find a call to set the password of a PDF file that I am creating from Excel Workbook using a VBA call.
    I basically have this Excel VBA code that works fine and creates a file.
                pBook.PrintOut Copies:=1, preview:=False, ActivePrinter:="Adobe PDF", _
                               PrintToFile:=True, collate:=True, PrToFileName:=PSFileName
                ' Convert the postscript file to .pdf
                Dim myPDF As PdfDistiller
                Set myPDF = New PdfDistiller     
                myPDF.FileToPDF PSFileName, "", ""
    BUT, I need to set the password on this PDF file and do not see an option to do so.
    Can you provide a solution for this situation? Appreciate your response in advance.
    Thanks.

    There is no way to set password programmatically using any other dll or any other kit?
    I am creating a bunch of PDF files for users programmatically but then they have to go in and set password themselves? This is very inconvenient for users.

  • Problem with controlling Annotations from Excel VBA

    Hi,
    I have a PDF document that has plenty of sticky notes attached to it. These sticky notes have been added by multiple authors on all pages of the document. I am trying to import the contents of these sticky notes, their author and the page number to an excel spreadsheet.  I am using Excel 2007 and Acrobat Professional 9.0.
    This is the code that I am currently using to import the sticky notes, but the problem that I am facing is that when I run the macro -
    Same sticky note contents, author and page numbers are imported multiple times
    Not all sticky notes are imported, only some of them appear in the final excel spreadsheet
    When I compare the number of sticky notes to that in the original PDF file, the number is correct. But the content is repeated content and that is the reason why only some of the sticky notes are imported.
    This is an activity that I need to do on regular basis and the number of sticky notes that I need to import to excel may range between 100 to 200. It is really difficult to do this task manually, so an excel VBA macro could prove really helpful.
    Sub ImportComments_Click()
    Dim Fpath As String
    Dim WordObj As Object
    Dim wbkOutput As Excel.Workbook
    Dim iRow As Integer
    Dim i, j, k As Integer
    Dim lRet As Long
    Dim objAcroAVDoc As New Acrobat.acroAVDoc
    Dim objAcroPDDoc As Acrobat.AcroPDDoc
    Dim numPages As Long
    Dim lAnnotscnt As Long
    Dim Subtype As String
    Dim NumComments As Long
    Dim AcroApp As Acrobat.AcroApp
    Dim objAcroPDPage As Acrobat.AcroPDPage
    Dim annot As Acrobat.AcroPDAnnot
    Sheets("Defect Log").Select
    Range("L3").Activate
    Fpath = ActiveCell.Value
    Sheets("Defect Log").Select
    Range("A1").Activate
    i = 0
    Do While (Not (IsEmpty(ActiveCell.Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 1).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 2).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 3).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 4).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 5).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 6).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 7).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 8).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 9).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 10).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 11).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 12).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 13).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 14).Value)))
    i = i + 1
    ActiveCell.Offset(1, 0).Select
    Loop
    iRow = i + 1
    Set wbkOutput = ActiveWorkbook
    lRet = objAcroAVDoc.Open(Fpath, "")
    Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
    numPages = objAcroPDDoc.GetNumPages()
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(0)
    For k = 1 To numPages
    lAnnotscnt = objAcroPDPage.GetNumAnnots()
    For m = 0 To lAnnotscnt - 1
    If lAnnotscnt = 0 Then Exit For
    Set objAcroPDAnnot = objAcroPDPage.GetAnnot(m)
    If (objAcroPDAnnot.GetContents <> "" And objAcroPDAnnot.GetSubtype = "Text") Then
    Cells(iRow, 5).Value = k
    Cells(iRow, 2).Value = objAcroPDAnnot.GetContents()
    Cells(iRow, 11).Value = objAcroPDAnnot.GetTitle()
    iRow = iRow + 1
    End If
    Next m
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(k)
    Next k
    lRet = objAcroAVDoc.Close(1)
    Set objAcroAVDoc = Nothing
    Set objAcroPDAnnot = Nothing
    Set objAcroPDPage = Nothing
    Set objAcroPDDoc = Nothing
    End Sub

    Make sure you are current with 9.x patches, just on general principles.
    The code seems fine – nothing jumping out at me.
    You can also look at using the JSObject methods and trying this via the JavaScript stuff – that will give you more access to the Annotation information…
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 24 Nov 2011 04:25:12 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problem with controlling Annotations from Excel VBA
    Problem with controlling Annotations from Excel VBA
    created by apreeti<http://forums.adobe.com/people/apreeti> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044740#4044740

  • How to read ssas cube and role from Excel vba

    Hi,
    I want to read all roles and cubes in SSAS Db from Excel Vba.
    1. First i want to read all the roles which was assigned to me
    2. based on the role, i have to read all cube name
    Please help me to
    accomplish this task.

    Hi Jack,
    In Analysis Services, Each role contains members, by Windows username or by Windows group, and permissions (read, process, administrator). If the user has the permission to access SSAS database, then the account was contained in one or more roles. When connect
    to SSAS database, we need to use an account to log on it, and SSAS will list all the cubes' name based on the role automatically.
    Reference
    Using Excel to interact with a SSAS cube
    Regards,
    Charlie Liao
    TechNet Community Support

  • Need to checkout MS Project file from Excel VBA

    I have a VBA Excel macro that can open an MS Project file, and extract data.  It works fine when the MS Project file is on my hard drive or other location where no check out is required.  But often the MPP files I need to access are stored in SharePoint,
    in document libraries, that have checkin/checkout enabled.  I am aware of the the way to do this for an Excel file, such as the following code snippet.
     ' Determine if workbook can be checked out.
     If Workbooks.CanCheckOut(Filename:=docCheckOut) = True Then
      Workbooks.CheckOut (Filename:=docCheckOut)
     Else
      MsgBox "You are unable to check out this document at this time."
     End If
    I need to be able to do the same thing for MPP files.  Here is the code I have; however, I get a compile error on the CheckOut line, indicating "wrong number of arguments or invalid property assignment".  My research suggests that I should
    get this compile error, as it only works on certain collections.  Even the line containing "CanCheckOut", while it does not give me a compile or run time error, it does not return the proper response.
     Dim mpApp As MSProject.Application
     Set mpApp = New MSProject.Application
     AppActivate "Project Professional"
     ' Determine if mpp file can be checked out.     
     If mpApp.CanCheckOut(mppFileToOpen) = True Then
      mpApp.CheckOut (mppFileToOpen)
         Else
             MsgBox "Unable to check out this document at this time."
        End If
    Is there a way to checkout an MS Project file stored in SharePoint from within Excel VBA?  Thanks.
    Ray

    Rod,
    Thanks very much.  This was, indeed, the solution.  Don't know how I could have missed this.  
    I did run into some issues with ensuring proper object references, checking back in, and being able to handle files that may be on a laptop, SharePoint site with checkout requirements, or SharePoint site without checkout requirements.  Also faced an
    issue checking back in; part of my macro opens the MPP file (that is checked out), acquires various pieces of data, then runs a macro in the MPP file that exports data to an excel spreadsheet.  After this macro runs (does a save-as using a map), check
    in is no longer possible.  Fortunately, I could checkout the MPP file, open it, get all the required data elements, make a few changes to the MPP file, check it back in (but not close), then run the macro, then close without saving.  In the end,
    it all works like a champ.  Thanks very  much for your advice.
    Ray

  • Calling UDF (MS Access) from Excel VBA

    Hi,
    I need to run a query on an MS Access database that has to perform a weekday calculation between two date columns,
    and this query has two date parameters that it receives dynamically. I am using Excel VBA as the front end.
    Select AgeRange, count(*) from
    (Select IIF(networkdays(date1,date())<=2, "0-2 days","over 2 days")) as AgeRange
    from table1
    where date2 >= startdt
    and date2 <=enddt
    ) d
    group by AgeRange
    The actual query is more complex, but this will help illustrate the issue. I build a string variable with
    the query, and substitute Startdt and enddt variables with the actual values. I then create a new QueryDef object and get the results from OpenRecordSet.
    Except, Networkdays is not a valid function in MS Access. So, this query fails.
    I created a WorkDays UDF in MS Access, and used that instead - the query works fine in MS Access, but when
    I try to pass it in the QueryDef object, it fails with 3085 error (function not available).
    I'm not sure how to get around this, and could use some help.
    In summary, I need to run a select query that will calculate weekdays or workdays between two columns (query
    is dynamic - dates are variable) from VBA to MS Access, get the results back to VBA so that I can populate the results. Any suggestions are appreciated and welcome.
    Thanks!
    I tried using datediff with the "w" parameter, but that doesn't work as I had hoped - it gives the
    number of weeks between the dates instead of weekdays
    I realize that I could get all the data (without doing the group by) down into Excel and then, do the networkdays
    formula calculation there, and summarize after that, but that is a very inefficient way - and defeats the purpose of having an access database in the first place. Getting tens of thousands of records is going to cause space issues in Excel too.

    Hi Bob,
    One solution is to create a table in the Access database storing all the dates in these years, add a column to determine if this date is a week day or not. And create another table to store the dates that are to be excluded from the working days.
    In this way, you need to create a separate query to count the valid working days based on the two tables. So the most difficult thing is to create the table that contains all the dates, please check this VBA code snippet which helps you to insert all the
    dates into the table.
    Sub InsertDatesIntoTable()
    Dim StartDate As Date
    Dim EndDate As Date
    Dim d As Date
    Dim w As Integer
    Dim IsWorkDay As Boolean
    StartDate = #1/1/2015#
    EndDate = #12/31/2015#
    For d = StartDate To EndDate
    Debug.Print d
    w = Weekday(d, vbSunday) 'first day of the week is Sunday
    If w = 1 Or w = 7 Then ' if the current day is Sunday or Satuday
    IsWorkDay = False
    Else
    IsWorkDay = True
    End If
    'Here you can insert d and IsWorkDay into the table
    Next d
    End Sub
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Send SMS from excel (VBA)

    I need help to find a solution that always works to my current problem:
    Using Excel 2007 VBA I need to send a similar text message to say 50-100 people using Nokia PC suite. Has anyone found a way of doing this?
    I have found a way of opening and then initially controlling PC Suite in VBA by using sendkeys, however it always falls over at some point as it loops through all the staff.
    Scenario is simple - I have built a rota for where I work. Each employee receives an email with their rota in it for the coming week; I also want to send a short text message to each employee telling them that their rota is in their email inbox and details of their next shift.
    So, the VBA code loops through each staff member, customises the text message contents but always falls over for no apparent  part way through the loop. I have succeeded in getting it to work for 5 people, but it falls over when it gets into double figures.
    I could get it to send bundles of 5 but there must be an easier way; someone must have tried doing what i'm doing and succeded!
    Thanks

    Hi,
    I would like to know the way in which I can achieve the above. i.e. Send SMS from Excel. even 2-5 sms will work for me..
    Thanks...

  • Call Transaction from Excel VBA macro and download ALV list object results

    I have a situation that must be very common u2013 but I canu2019t find any clear information on how to get it done! 
    We frequently run SAP transactions, download the results (orders or inventory) into Excel, do some calculations and create a spreadsheet report. 
    I would like to automate this process using Excel VBA so that a macro will perform these steps:
    1. Run our custom SAP report "YSD033" that summarizes orders using the previous day as the [From Date] parameter.  (The user already has an active ECC 6 R3 session running.)   If possible, can the TC be run using a specific variant "G111BIZ" ?
    2. Download the list object that appears in an ALV grid as a table to an empty spreadsheet in the active workbook (export XXL list object)
    3. Save the resulting workbook and close Excel.
    Should the solution use u201Ccall transactionu201D or a GuiXT script?
    Any help would be much appreciated, and some sample VBA code would be great!
    Thanks.
    Glenn

    Good suggestion, but
    I get "permission denied" for   SapGuiAuto.GetScriptingEngine
    I also tried the method below, but received this RFC error message:
    User PPPPPPP  has no RFC authorization for function group SYST.
    Sub LoginCheck()
    If login = False Then
        ' Setting the necessary variables for R/3 connection
        Set objBAPICortrol = CreateObject("SAP.Functions")
        Set objConnection = objBAPICortrol.Connection
        ' Establish a connection
    If objConnection.Logon(0, False) Then
        login = True
        MsgBox "Connection Established"
        CommandButton1.Caption = "Disconnect"
    End If
    Else
        CommandButton1.Caption = "Connect 2 SAP"
        login = False
        objConnection.Logoff
        Set objConnection = Nothing
        Set objBAPICortrol = Nothing
    End If
    End Sub
    I was told that these kinds of authority open up too big of a window that can't be monitored adequately...
    I'm considering an approach like what is below if I can't convince security to grant me permissions...
        Application.Wait Now + TimeValue("00:00:01")
        SendKeys EnterKey, False
    Since blocked RFC security settings are preventing the solution from being installed, I am markgin this question as answered. 
    I will post different questions about 1. how to convince the security team that it will be safe to allow the use of RFC calls, and /or 2. how use some windows-level scripting code to run the SAP jobs.
    Thanks.
    Edited by: GlennWebster on Mar 1, 2010 4:34 PM

  • Download Data From Excel - VBA Code to SAP Using BDC

    Hi ,
    I am Sudhir Dure, working with Satyam Computers.
    I need help on the below query:
    I have an excel file which download data from Excel to SAP using RFC function & with the help of VBA interface.
    In this VBA code I have used BDC recording of SAP Transaction KE21N to post data into SAP.
    Now I am facing problem to find sub screen (tab page screen ) in SAP from VBA code .
    How to pass BDC Subscreen details from VBA code to SAP using below code?
    BDCTABLE.Rows.Add
    BDCTABLE.Cell(J, "PROGRAM") = PROGRAMNAME
    BDCTABLE.Cell(J, "DYNPRO") = "0200"
    BDCTABLE.Cell(J, "DYNBEGIN") = "X"
    BDCTABLE.Cell(J, "FNAM") = "BDC_OKCODE"
    BDCTABLE.Cell(J, "FVAL") = "=NEXT"
    Thanks,
    Sudhir Dure
    9972097464

    can anyone tell me how to get the PurchaseOrder number and item quantity from the Salesorder...? what are the fields here as given below..??
    For Each oItem In oSalesOrder.items
    wsTemplate.Range(cols(3) & Indexv).Value = oItem.material.material
    'wsTemplate.Range(cols(4) & Indexv).Value = ' I need item quantity here ????
    wsTemplate.Range(cols(1) & Indexv).Value = sapSoNumber
    wsTemplate.Range(cols(2) & Indexv).Value = ' I need purchase order number here>???
    Indexv = (Indexv + 1)
    Next
    reply fast. please .. thanks

  • Powershell Variable from Excel.VBA Macro

    Hi Guys!
    I don't know if what i'm asking you is achievable.
    I've learned how to pass variables/arguments from powershell to Excel/VBA Macro but i need to do the opposite thing.
    This is an example of what  i want:
    Powershell                                                                      
                       Excel/VBA Macro
    $Input=1   ---------------------------------------------------------------->   Sub Macro(input)
    $excel.Run("Macro",$Input)                                                              
      Output=input +6
    $output (Expected 7)   <----------------------------------------------------  return Output
    I don't know how to do this can you help me please?
    A

    Ok guys those are the script.
    Macro:
    Sub CreatePWD()
    Dim PWD As String
    Dim i As Integer
    Dim Max As Integer
    Dim F1 As Worksheet
    Set F1 = ThisWorkbook.Worksheets("Foglio1")
    Max = F1.Range("A1").Value
    For i = 1 To Max
    If Int((2 * Rnd) + 1) = 1 Then
    PWD = PWD & Chr(Int((90 - 65 + 1) * Rnd + 65))
    Else
    PWD = PWD & Int((9 - 0 + 1) * Rnd + 0)
    End If
    Next i
    MsgBox PWD
    End Sub
    Powershell:
    $Excel = New-Object -ComObject excel.application
    $Excel.visible=$false
    $Version = "C:\Users\Alberto Corona\Desktop\Cartel1.xlsm"
    $WorkBook= $Excel.workbooks.open($Version)
    $WorkSheet= $WorkBook.worksheets.item(1)
    $WorkSheet.cells.item(1,1)=5
    $Excel.Run("CreatePWD")
    $WorkBook.save()
    $WorkBook.close()
    $Excel.quit()
    The result of macro is like "52UT7" i want a variable in powershell called $PWD that contain the value of the macro. 
    Hope the problem is clear now.
    Thanks
    A

  • Running BEX7 workbook repeatedly from excel vba

    On a monthly basis I have about 300 reports to run,all from the same bex7 workbook,  just with slightly different variables.
    I was able to setup a macro in bex 3.5 that would refresh a report and fill in values into the SAPBEXqueries hidden sheet.  This would adjust each time and save each report with an individual name.  Saved me about 3 hrs of sitting and running each report manually.
    My company is now upgrading to BEX7 and I am having difficulty getting my head around how to run the same workbook in BEX7 through a VBA Macro and pass the variables to it.
    I understand you can use SAPBEXsetVariables to pass variables along to the workbook but what format do the variables have to be in to communicate successfully with the workbook
    Would someone have an example of the process?
    I do not have access to modify the query at all as I am an end user and I am forced to come up with a solution on my own.
    Any help would be appreciated.
    Thank you
    Dan Gerling

    Hi Dan, in the same situation I'm afraid. Just posted this in a similar thread:
    "Hi Alfredough, I'm afraid I'm in pretty much the same situation as yourself (although possibly slightly further down the line). The reason I add that possibility is because I'm pretty certain that SAPBEXsetVariables has been removed in 7.x.
    It looks like there are some cludges which can be done to work through this (possibly), but the entire comparison of bexanalyzer.xla to sapbex.xla seems to involve features being removed, rather than added.
    Here's the thread which seems to give a cludge, which I'm having trouble getting working: How to set variables values via VBA.
    There's also some work which someone's done here around script objects: List BEx Analyzer 7.X variables and generate the associated PROCESS_VARIABLES commands

  • Getting clusters from LabVIEW ActiveX Server with Excel/VBA

    Hello,
    my colleague and I are trying to control a LV from Excel (VBA) by ActiveX.
    I.E.:
    We do something like :
    Set LV = createObject("LabVIEW.Application")
    Set VI = LV.GetVIReference("Path_to_VI")
    ParamNames(0) = "Input1"
    ParamNames(1) = "Input2"
    ParamNames(2) = "Output"
    ParamValues(0) = 1
    ParamValues(1) = 3.1415
    Call VI.Call(ParamNames,ParamValues)
    msgbox("output =" & ParamVals(2))
    This works perfectly for simple data types (int, double, float, string, etc )
    Now we need to transfer more complex structures, which are originaly LV-clusters.
    But we did not find any clue on how do that (especially receive clusters) in the help or on the internet.
    Is there any chance to succeed ???
    TIA,
    Thomas

    Actually, working with clusters is really really easy. Through the magic of - well something - a cluster in LV comes out in the VBA environment as an array of variants. There was an activex example that shipped with V7.1 that showed this very thing. I couldn't find them in V8 so here is the 7.1 stuff.
    Check out the macros in the Excel spreadsheet... This show running the VI in the development environment, but if this looks interesting I can fill you in on how to make it work in an executable.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    freqresp.xls ‏49 KB
    Frequency Response.llb ‏155 KB

  • Excel VBA to access sharepoint list without permission

    Hi,
    I do find solution to retrieve the SharePoint list from excel VBA but my problem now is on the SharePoint permission to the list.
    I am developing this solution in excel because i don't want the particular user to access the list direct from the portal because the list contains some unique and confidential data. So what i did was created a new view in the portal with selected column
    and i connect to the view from excel. So every time the user want to retrieve the data, he can run macro to refresh the data in the excel.
    When i run the macro it can generate the list because i do have permission but if i run the same macro on the person machine, excel request for username and password because he don't have the permission to the list.
    Are there any work around to allow the user to generate the data in excel without permission to the SharePoint list.
    Thanks for the help.

    I've done this before using SQL Server Reporting Services integrated into SharePoint.
    Using SSRS, create the report you want the end user to view. Then create a Report Subscription, emailing the end user (or putting it in a file share/Doc Lib) the report. If they want to run it interactively, you can enable caching on the report, which would
    pull the report from the last time it was scheduled to run (the data would not be 'real time' in this case).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Sending arrays from Excel into Labview

    I want to send an array from Excel VBA into a LabView VI.
    The Excel example shows how to send individual numbers and return an array into Excel but not send an array.
    Everything tried sends blank arrays into LabView, which can then be modified in LabView and returned to Excel.
    A VBA code snippit that does not work is:
    Sub LoadData()
    ' LoadData Macro
    ' Keyboard Shortcut: Ctrl+l
    ' This is an example to demonstrate LabVIEW's Active-X server capabilities.
    ' Executing this macro loads a LabVIEW supplied example VI "Frequency Response.vi",
    ' runs it and plots the result on an Excel Chart.
    Dim lvapp As LabVIEW.Application
    Dim vi As LabVIEW.VirtualInstrument
    Dim paramNames(0)
    Dim paramVals As Variant
    Set lvapp = CreateObject("LabVIEW.Application")
    viPath = lvapp.ApplicationDirectory + "\examples\apps\freqresp.llb\DAK Frequency Response.vi"
    Set vi = lvapp.GetVIReference(viPath)   'Load the vi into memory
    vi.FPWinOpen = True                     'Open front panel
    paramNames(0) = "Foo"
    paramVals = Sheet1.Range("j1:j1000").Value
    Call vi.Call(paramNames, paramVals)
    This code generates an error - expecting 1D array or variants.
    However, if I supply the correct array, then LabView thinks it is empty
    'foo' is a cluster
    'Array' is a double array
    Neither work to receive the data

    Thanks for the reply but that approach will be difficult.  The problem to solve is relatively simple IF LabView could read arrays (it writes arrays easily).  Here is the problem:
    I want to convolute two large arrays.  I have written VBA programs to do this but they take too long - over 30 sec whereas the LabView version take <1 sec IF I could get the data into LabView.
    The convolute is part of an optimization program that goes though many loops so that it takes hours to run efficiently AND if I manually change cells in the spreadsheet, then it takes 30sec to come back as VBA does not respect clean cells (for some reason).
    I was trying to write a function in VBA to do this calculation via LabView rather than VBA.  One way to  do this is to write a text file in VBA and read in LabView, then pass the results back or maybe the clipboard as a buffer.  That is faster but clumsy.  You could also have LabView look for dirty cells and then do the calculation as the server rather than the client.  Again, time consuming and cumbersome.  I have written pure LabView code to do the curve fitting but prefer to use Excel as that is easier to incorporate and work with the data.   You can do convolute using FFTs but Excel does not do that correctly - they CANNOT make their FFTs into a function (VBA functions cannot modify cells in the spreadsheet but only return variables.  FFT modifies cells so cannot be called from a function, only a macro, which then needs to be updated manually).  Again, I can kluge VBA (real kluge this time) to make FFTs work as a function BUT prefer the LabView solution, if possible, as I am not sure the FFT will actually save time.
    I am not sure if the problem is LabView's fault or Excel's (2013) fault that the variables are not set-up properly.  LabView claims to be able to do this.  Again, you can pass single variables into LabView and read back arrays but try as I might, I cannot get arrays into LabView.
    Any help in sending arrays (maybe Labview expects a variant variable and needs to convert it somehow) would be appreciated.  Variants are suppose to be able to be converted automatically but maybe there is a bug in LabView (2010) that does not handle input variant arrays correctly (I have tried making them clusters, double arrays, ect).  LabView thinks that all the arrays sent by VBA are empty. If LabView modifies the same array, VBA sees that modification so that the addresses appear to be sent correctly i.e. the array "handle" is being sent to LabView or else it could not fill the array to send back to VBA.
    If ever this is solved, I will put on-line the solution for others as again marrying both programs will have advantages.  Others may find this interesting is marry LabView with Excel so that LabView does some of the heavy calculations that Excel has kluged. 

Maybe you are looking for

  • Converting single instance database(11gr2) supporting EBS 12.1.3 to 2 node RAC on RHEL.

    Hi We are in the process of converting single instance database(11gr2) supporting EBS 12.1.3 to 2 node RAC on RHEL. Which version of RHEL is better? if its 6.x then x?? The oracle document only says RHEL update 6. thanks in advance.

  • How to get the amout(menge),unit price(netpr) and sum of  consignment PO

    hi expert:       Because there are no  netpr and netwr of consignment PO in EKPO table, i want to know that how i can get the amout(menge),unit price(netpr) and sum(netwr)  of the material in this consignment PO between a definite time.       would y

  • Tp problem

    When importing upgrade for enhancement package 3 I encounter following error: ting upgrade for enhancement package 3 I encounter following error: The installation was stopped, since an error occurred during the phase IMPORT_PROPER, which the Add-On I

  • Problem Transforming

    Hi All, I am facing a problem transforming an XML document using XSLT. I have two XML documents.One is the source document. In the XSL i refer to another XML document which is in the same folder as the source document using document() function.(My XS

  • Runtime.exec open new DOS Window

    Hi, I want to execute a program (a.exe) having as work directory (C:\geo\B\) I create a batch file for changing into the directory and executing the command in the way: cd C:\geo\B start a.exeThis batch file (art.bat), I execute it in the following w