Excel VBA & wWeb Quary

Hello group,

I have a macro that was written under Windows XP and run the file. When I run it on a Vista system though does not reach the web request. I don't get a choice to run Excel as an administrator. Simply, it stops running and the task manager says "does not work."

Any ideas appreciated.

Thank you

David

Excel:

 

http://answers.Microsoft.com/en-us/Office/default.aspx

Office at the above link forums

http://answers.Microsoft.com/en-us/Office/ee861099.aspx

Forums help Excel at the link above

They will help you with your questions Excel when repost you in the Office Forums above.

See you soon.

Mick Murphy - Microsoft partner

Tags: Windows

Similar Questions

  • Client server of executable activex LabVIEW project with excel vba

    Hi all

    I submitted a ticket to support nor on this problem, but my deadline for this project is very close, so I would like to ask the community to see if someone has encountered this problem before (I hope it's ok that I'm doing this!). I did a fair amount of forum-scouring, and I didn't know this even discussed problem.

    I built a labView project which is essentially in the material data and
    preforms various visualizations and transformations on the data. A bit of the
    Screws in this project are available by VBA Excel as a Server ActiveX with LabView and
    Excel as the customer - and it works! I recently discovered I would need to do a
    executable version of my project, so I'm now trying to figure out how to do the same thing
    with my executable file as the server instead of LabView. Here's a simplified version are
    My VBA code:

    Void Button1_Click()
    Dim lvapp As MyServer.Application
    Dim vi MyServer.VirtualInstrument

    Set lvapp = CreateObject ("MyServer.Application")
        
    VI the value is lvapp. GetVIReference ("Main.vi", "", True)
        
    Sheet1.cells (1, 1) = vi. GetControlValue ("Path")
        
    lvapp. Quit smoking
    End Sub

    I replaced LabView here with the name of my server. The code
    failure of the CreateObject method with the following error:

    Run-time error '13':
    Type mismatch

    Things, I'm pretty sure I'm doing it correctly:
    -L'application is configured as an ActiveX server in the build options
    -J' ran the VI once and close/re-open it just after each build before trying the
    worksheet
    -In excel, VBA method is configured to reference the type library of the server.
    -J' have LabView itself closed when I run the .exe

    Thank you

    Alex

    My versions and such:
    Software of NEITHER: LabVIEW version 2012
    OS: Windows 7

    It's interesting - I'll have to look into the issue. In the meantime, I found a solution.

    It's quite mysterious, but it seems that all I had to do was make sure you only the type library of the server executable has been referenced in VBA (no LabView or OLE type library) and declare the variable app as object, rather than MyServerName.Application. Honestly, I have no idea why this works, but it does. Also, I learned that you need to use the executable file paths, which are a little different than the paths of project files.

    Thank you

    Alex

  • Excel VBA for JS: How does a rectangle col coordinated to a JS function.

    I have an Excel VBA sub that calls a function JS folder level and I'm going through a set of coordinates of rectangle.

    This is the VBA code:

    Void BarcodeDoc_PDF417 (String pdfFileName)

    Dim AVDoc As Acrobat.CAcroAVDoc

    Dim PDDoc As Acrobat.CAcroPDDoc

    Dim myApp as Acrobat.CAcroApp

    Jso As Object Dim

    Dim bcTmpFile As String

    bcTmpFile = "C:\Temp\bcTmpFile.pdf".

    Set myApp = CreateObject ("AcroExch.App")

    Set AVDoc = CreateObject ("AcroExch.AVDoc")

    If AVDoc.Open(pdfFileName, "") then

    Set PDDoc = AVDoc.GetPDDoc

    Define the jso = PDDoc.GetJSObject

    jso.myAdd417Barcode 'where is the coordinates transmitted.

    PDFSave PDDoc, bcTmpFile

    myApp.CloseAllDocs

    myApp.Exit

    Set AVDoc = Nothing

    Define the jso = Nothing

    Set PDDoc = Nothing

    Set myApp = Nothing

    On the other

    MsgBox "Sub: BarcodeDoc_PDF417.» "Document not found:" & vbCrLf & vbCrLf & pdfFileName

    End If

    End Sub

    This is the level of JS script file:

    function myAdd417Barcode (myCoords)

    {

    The line below is just to test. Going once I get the coords in my sub VBA.

    var myCoords = [324, 756, 540, 720];

    InsertPDF417Barcode (this, myCoords);

    }

    I tried to move the coords as a string and a table, the two nothing helps. Any ideas?

    Thank you.

    He is quite right, myCoords is not defined. mycoords is however.

  • Adobe Javascript from Excel VBA

    I have some have little experience with VBA Excel and Adobe Javascript separately, but I never tried to put it together. I'm quite baffled by the use of 'DoJavaScript' from in Excel VBA. I have a number of JavaScripts Illustrator that do various tasks (for the most part, measure and set properties on illustrator objects to determine geometric measures). I wanted to run these scripts from Excel VBA (they run smoothly when it is called directly in Illustrator). My hope was to spend some real numbers of VBA in the JavaScript code before we ran to set some performance parameters and get some real numbers back out the JavaScript in VBA. I can't get even the simple DoJavaScript given command in Adobe VBscript reference to run. Read other messages that seem somewhat related that it is unclear if I hurt something very simple, or if my understanding of the use of the DoJavaScript command is incorrect. Is anyone able to shed some light on this?

    My last try was this simple test... almost directly from the reference from Adobe:

    Private Sub SetScale_CommandButton1_Click()

    Set appRef = CreateObject ("Illustrator.Application")

    Set myNumberOfDocuments = appRef.DoJavaScript("documents.length;")

    MsgBox myNumberOfDocuments

    End Sub

    I really hope to be able to run javascripts that are a few hundred lines long..but, even if I can't get something simple to go so I'm about to give up on this.

    Thanks for your suggestions

    I got type mismatch error, to make your sample work, simply remove the "second".

    Private Sub SetScale_CommandButton1_Click()

    Set appRef = CreateObject ("Illustrator.Application")

    myNumberOfDocuments = appRef.DoJavaScript("documents.length;")

    MsgBox myNumberOfDocuments

    End Sub

  • It is possible to automate Firefox uses Excel VBA

    We did Automating Internet explorer by using VBA, now we have some projects that supports and do the work on Mozilla only... If need to automate applications in firefox using VBA excel macros.

    I heard it is possible adding and some dll regestring. So could you please help me on this with precision.

    Thank you and best regards,
    Nani.

    This forum is for the support to the users , your question is beyond the scope of assistance to users.

    Try searching for the Mozilla Developer Network site on your query.
    https://developer.Mozilla.org/en-us/

    Here is an article on the generation of a component DLL.

    https://developer.Mozilla.org/en-us/docs/Building_a_component_DLL

  • Excel vba "DAQmxErrChk sub or function not defined".

    Hello

    I am trying to run a task created in NI Measurement and Automation Explorer inside excel exsisting.  I've seen MANY visual basic examples on how to run an existing job, my problem is the following:

    "DAQmxErrChk: sub or function not defined".

    In the visual basic editor, under 'Tools - References' I can choose different libraries to include.  I've included all the libraries, I have and the problem persists.  I know that the 'DAQmxErrChk' function accepts some arguments, but without it, I can't find a way to read a card value of the cDAQ I use (NOR cDAQ-9172).  All I have to do is read the voltage of a single entry.

    Any help would be greatly appreciated.

    There may be a few additional steps for VBA Excel that use a low file.  However, in the place of this investigation, it might be quicker to the subroutine to bugcheck (of the low file) just paste in your program.  The function is quite simple (just do some basic error handling).  Our examples of C perform a similar function that actually appears at the top of each example of .c file (rather than using a separate file).

  • REST API via Excel VBA, Excel reports? All Plans

    Hi, Fred / TJ (Eloqua).

    Is there a method or system library (.dll) file that we can use to pull the Eloqua reports directly in Excel. I met many cloud based system allowing this as part of a widely used feature.

    Any method that we can use to pull reports directly in Eloqua (VBA, Excel plug-ins, etc.). Would be very useful if we have many users marketing to draw relations stats in real-time to Eloqua, rather than each is trying to open a session in Eloqua every time.

    Thank you

    Amit Pandya

    Thanks for the comments, Amit.

    I guess that's an instance of the E10?

    We must do a better job of making reports available via the API data. Let's look at this when we look at this larger project.

  • Add a footer to PDF from Excel vba

    Hello

    I'm looking for vba codes that will add a footer in a PDF from a macro in Excel.

    Thank you

    Eric

    You can access the headers/footers feature in Acrobat through the API, so you'll have to look for a different mechanism to add a footer to a document. I've done in the past is via the bridge VBA/JS ("JSObject") to call the Doc.addWatermarkFromText () method. See here for more information about the JavaScript method: http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat11_HTMLHelp&file=JS_API_AcroJS.89.448.html

    You will need to review the Acrobat SDK API documents to learn how to use the JSObject. This previous discussion forum contains information on the use of the Doc.addWatermarkFromText (fromVBA): How to add text to a PDF by using VBA Access?

  • Excel VBA very slow ACRODISTXLib.PdfDistiller.FileToPDF 07

    Company is upgrading from Office 2003 to 2007

    Excel spreadsheet generates about 250 cards and makes PDFs of them, using VBA.

    Excel 2003 is about 250 usually in less than 6 min.

    Using the same code,

    Excel 2007 takes about 45 min or more doing the same course.

    Distiller / creating PDF files seems to be one of the critical bottlenecks.

    I use ACRODISTXLib.PdfDistiller.FileToPDF

    It's pretty standard code

    -------------------------------------------------------------

    If MyPdf_Machine is nothing then set MyPdf_Machine = New PdfDistiller
    sTemp_PS_FileName = sD_Path & "tmp.ps".
    ActiveChart.PrintOut Copies: = 1, Preview: = False, Collate: = True, printtofile: = True, ImprDsNomFichier: = sTemp_PS_FileName
    Print_PDF_Sheets = MyPdf_Machine.FileToPDF (sTemp_PS_FileName, sPDF_File_Name, "")

    --------------------------------------------------------------

    Are there known issues with Office 2007?

    Should I try pdfDistiller6?

    Should I monkey with Distiller parameters? Currently high quality production - Acrobat 5 compatibility

    Is there a faster way?

    I know that excel 2007 is slower, but you've got to be kidding me. It cannot be 800% slower.

    Thanks for any direction you can provide.

    Jim

    So the PrintOut is in Excel - there is nothing that makes Adobe here...

    One thing you might want to consider is to print directly to the printer Adobe PDF instead of the PS creating and running then distill.

  • HypRetrieve returns-3 Excel VBA

    I wrote a VBA code to run a macro within my Excel 2007 spreadsheet. I use the Hyperion Smart View 9.3.1.2.029 version. Here's the code I created to refresh my worksheet:

    Void refreshData()
    "FileSystem.FileCopy"C:\ExpenseFcstDownload\Expense_Forecasting.txt","C:\ExpenseFcstDownload\Expense_Forecasting_Previous.txt"

    "Application.ScreenUpdating = False '.

    Dim costCenterRowStart As Integer
    Dim costCenterColStart As Integer
    Dim costCenterCell As range

    Dim forecastRowStart As Integer
    Dim forecastColStart As Integer
    Dim forecastCell As range

    Dim fileName As String
    Dim delimiter As String
    Dim append As Boolean

    Dim Report As String

    Dim i As Integer

    costCenterRowStart = 2
    costCenterColStart = 1

    forecastRowStart = 6
    forecastColStart = 1

    fileName = "c:\Expense_Forecasting.txt".
    Delimiter = ' | '
    Append = False

    I have = 0

    Set costCenterCell = getCell (costCenterRowStart, costCenterColStart, Sheet4)
    Set forecastCell = getCell (forecastRowStart, forecastColStart, Sheet2)

    connect

    While (i, 0) costCenterCell.Offset <>«»
    range (forecastCell, forecastCell.End (xlDown)). Claire
    'Sheet4.Select' sheet cost center
    costCenterCell.Offset (i, 0). Copy
    'Sheet2.Select' forecast worksheet
    ' forecastCell.Offset (0, 1). Select
    range (forecastCell.Offset (0, 1), forecastCell.Offset (0, 1).) End (xlDown)). Offset (0, - 1). PasteSpecial (xlPasteValues)
    «Range (forecastCell.Offset (0, 1).» Address, forecastCell.Offset (0, 1). Address.End (xlDown)). Select
    "Range (forecastCell.Offset (0, 1), forecastCell.Offset (0, 1).). End (xlDown)). Offset (0, - 1). PasteSpecial (xlPasteValues)
    forecastCell.Offset (0, 7). Formula = "= VLOOKUP (TRIM (B6), 'ACCOUNT MAPPING'! '. ($A$ 5: $B$ 291,2, FALSE) ".
    forecastCell.Offset (0, 7). Copy
    ' forecastCell.Select
    range (forecastCell, forecastCell.End (xlDown)). Offset (0, 7). PasteSpecial (xlPasteFormulas)

    "Application.Wait time + TimeSerial (0, 0, 30)"
    "do the update
    While Len (forecastCell) = 12
    recover
    Set forecastCell = getCell (forecastRowStart, forecastColStart, Sheet2)
    Wend
    "Application.Wait time + TimeSerial (0, 0, 30)"
    Set forecastCell = getCell (forecastRowStart, forecastColStart, Sheet2)
    forecastCell.Offset (0, 7). Formula = "= VLOOKUP (TRIM (B6), 'ACCOUNT MAPPING'! '. ($A$ 5: $B$ 291,2, FALSE) ".
    forecastCell.Offset (0, 7). Copy
    ' forecastCell.Select
    range (forecastCell, forecastCell.End (xlDown)). Offset (0, 7). PasteSpecial (xlPasteFormulas)
    ' Sheet2.Select
    ' forecastCell.Select
    "range (forecastCell, forecastCell.End (xlToRight)). Select
    "range (forecastCell, forecastCell.End (xlDown)). Select
    "export to txt.
    Append = i
    exportText forecastCell, fileName, delimiter, add

    ' forecastCell.Offset (0, 7). Select
    range (forecastCell.Offset (0, 7), forecastCell.End (xlDown)). Offset (0, 7). Claire
    ' forecastCell.Select
    range (forecastCell, forecastCell.End (xlDown)). Claire
    i = i + 1
    Wend

    Unplug

    Application.ScreenUpdating = True

    Workbooks (1). Save

    "FileSystem.FileCopy"C:\ExpenseFcstDownload\Expense_Forecasting.txt","P:\Expense\Load_Data\Expense_Forecasting.txt"

    Application.Quit

    Public void connect()
    Dim x As Long

    x = HypConnect ("forecast", "User1", "1234", "EssbaseSpendExpense")
    End Sub

    Public void disconnect()
    Dim x As Long

    x = HypDisconnect ("forecast data", True)
    End Sub

    Public Sub retrieve()
    Dim x As Long

    x = HypRetrieve ("forecast")
    End Sub

    If I'm not in my code (F8), it works fine. If I try to run the macro itself (F5), the HypRetrieve will return to random - 3. I noticed it seems to miss the most when I'm multitasking. If I keep the spreadsheet-based and do not move the mouse, it will work sometimes. I could not find a description of the error to-3 except that it's a local failure. I know others have become this type of error but I couldn't know how they have solved.

    Thank you.

    At first, I tried activating the worksheet before the call to retrieve, but that did not work. It turns out that you need to activate the application itself before during extraction.

    AppActivate "Microsoft Excel"

  • Convert excel vba to the Coronet script

    I have a working excel spreadsheet that allows to interpolate given z and x, y, using a matrix lookup table.  I enclose the excel file.  I would like to import this feature in Diadem.  Basically, I collect the engine rpm and the pressure of the circuit, and I would like to know what is equivalent to the output of the compressor resulting (l/min).

    These data are a vehicle for 100 Hz sampling frequency, and this would greatly help with data analysis.

    The excel user-defined functions are www.tushar-mehta.com

    Any help would be greatly appreciated.

    Hi hamiltoncj,

    It took me awhile, but I think I have a good solution for you.  I reworked the script you already had to deal with all of the measured values of XY and interpolate the value of Z for each measure.  I then created a REPORT layout that shows the surface of interpolation, the original research of values (Square markers) and the measured XY points (grey circles).  I also created a surface 2D and 3D showing just the interpolated measured surface and its XYZ (of the gray circles) points.  Finally, I added all the Z channel values interpolated and displays the result on the sheet of each STATE.  To do the calculations and graphs to run faster, I had the script delete all the Governor = 1 lines from measured data so that all measured value XY lines which were outside the defined lookup range XY table.

    I quoted "summed up compressor Output" in litres as you suggested, but I'm not convinced than the units I found in your Excel sheet spread (X = 1/min, Y = bar, Z = l/min) support this conclusion.  It seems to me that if I have a bunch of values l/min in summary I get a value which still has its unit = l/min.  Have we not need to multiply the sum by the number of minutes between the measured data points (frequency of sampling in units of minutes)?  If so, then just do what change in 119 of the script line - this is where the "Sum_Output" property is calculated and added to the Z channel.

    Ask you questions,

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • SmartView Excel VBA and HypCell

    Hello, I'm trying to create a VBA function that takes a string as input and returns the SV data via the HypCell method.

    All three initially appear to derive the correct value.  However, change the string input or copy to another cell that refers to another channel continues to pull the original value.  In other words, regardless of the input string, each cell contains the same value.  Can anyone help solve this puzzle?

    Public Sub test().
    ActiveCell = HypCell (void, "#Expenses measures", "script #Actual")
    End Sub

    Public Function test2()
    Test2 = HypCell (empty, "Costs of measures #Operating", "#Actual script")
    End Function

    Public Function test3 (String str)

    Str = "measures fresh #Operating; Scenario #Actual.
    ' Application.Volatile
    test3 = HypCell (empty, str)
    End Function

    Thanks in advance

    Thank you for your help.  The problem is that capitalizaton.  'Measures' must be 'MEASURES' in our system.  Another point to note is that the SERVER "#" must precede the server while HSGETVALUE server is usually separated with nothing that precedes.

  • Is it possible to have Acrobat Javascript to send a message to VBA Excel?

    In short, what I'm trying to do is in the East to the code a button in an Acrobat of the file which, when pressed, will run some Javascript in Acrobat - say, app.alert ("you pressed me!"); and also somehow calls a routine in an Excel VBA file - say msgbox "which is good, you press this button in Acrobat!"


    Of course, it is trivial to make the first part. But the second part seems like he expected to be easy, but that it could be impossible.

    Is it possible to send a message to VBA whenever a particular event (such as a button press) occurs in Acrobat?

    (I can create a little slow and clumsy work around by creating a global variable in Acrobat Javascript that updates every time you click on a button and then permanently questioning the value of this global to Excel using getJSObject variable.) But in my particular project, this is undesirable and I hope that there might be a cleaner and more direct way to accomplish the same thing).

    I hope it is impossible by any means.

  • Spreadsheet Excel add after the syntax

    I have a large application that creates a report following a test.  The report is about 250 pages, each page represented as a group in the data portal.  When we deliver him customer report also wants an excel file with pairs of X - Y data for each of the graphs in the report.  I know how to make the selection of the data and copy/paste it to Excel.  Where I encountered problems, that's when I add worksheets in Excel, I can't figure out how to run the new worksheet to add at the end.

    According to the news on Excel VBA, there are parameters before and after that should allow you to do.  I can't quite understand the syntax to include these parameters.  The line of code in question is red.

    If you have nothing but the. Add the statement that the code works but the worksheets appear in reverse order.  I tried a number of different ways, and the script just dies without even showing an error.  I know one around which we work to scroll the list of the groups back, but that's not fair to sit well with me.  I prefer to do things in a logical manner, being from the first to the last.

    If there are questions please let me know.

    Thanks in advance.

    Wayne

    FilePath = autoactpath & "\dataoutputtemplate.xls".

    ExOpen = True
    Nomclasseur = NameSplit (FilePath, "N") & ".". XLS '.
    On Error Resume Next
    Set Excel = GetObject (, "Excel.Application") ' get Excel via OLE if it is already open
    If Err.Number <> 0 Then
    Err.Clear
    Set Excel = New ' start Excel via OLE
    If Err.Number <> 0 Then
    ' Exit Sub
    End If
    ExOpen = False
    End If
    Excel.Visible = true
    IsWorkbookOpen = Excel.Workbooks (WorkBookName) there's nothing = False
    If ExOpen then
    If not IsWorkbookOpen then
    Set ExcelWkb = Excel.Workbooks.Open (FilePath) ' open the Excel file if it isn't already
    End If
    on the other
    Set ExcelWkb = Excel.Workbooks.Open (FilePath) ' open an Excel file from excel is not already open
    End If
    Err.Clear
    On Error Goto 0

    GrpStart = GroupIndexGet ("Globals")
    NumGrp = GroupCount - GrpStart
    ReDim PageList (NumGrp)
    ReDim SectList (NumGrp)
    b = 1
    c = 1
    for a = GrpStart to GroupCount
    CurGrpName = GroupPropValGet (a, "name")
    If InStr(CurGrpName,"List") then
    SectList (b) = Mid(CurGrpName,5) ' remove 'List' in the name of the group to be used in the Table of contents
    b = b + 1
    End If
    If InStr(CurGrpName,"_") then
    PageList (c) = CurGrpName ' Gets a list of groups that should be exported
    c = c + 1
    End If
    Next "(a cycle through groups can gather names)
    ' Add the Table of contents: sheet in workbook
    Set ExTOC = Excel.Workbooks (WorkBookName). WorkSheets.Add
    ExTOC.name = "Table of contents".
     
    For d = 1 to c - 1 ' c is the number of valid sheets in the report which will be exported
    Set ExcelSht = Excel.Workbooks (WorkBookName). WorkSheets.Add (after: = last sheet in the workbook)
    ExcelSht.Name = PageList (d)
    Next would then report to export page

    Hello Wayne!

    What you need to know, is that you can leave empty parameters. The solution to your problem is:

    Set ExcelSht = Excel.ActiveWorkbook.WorkSheets.Add (, Excel.ActiveWorkbook.WorkSheets (Excel.ActiveWorkbook.WorkSheets.Count))

    Matthias

  • Unable to connect to oracle DB using VBA and you are prompted with the error:-the client components and Oracle network have not been found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or installation of the

    Hello

    It would be helpful to me if someone can give me instructions on setting the version of driver or oracle client required to connect to the the Oracle DB using excel VBA

    My config: -.

    Windows - 8-64 bit

    Excel 2013-32 bit

    The components of the client / I should install, and how to solve the question below...

    I tried the VBA code... but you are prompted with the error message above

    Void Oracle()

    Con Dim As ADODB. Connection

    Dim rs As ADODB. Recordset

    Dim query As String

    The con value = New ADODB. Connection

    Set rs = New ADODB. Recordset

    strCon = "Driver = {Microsoft ODBC for Oracle}"; "." & _

    "CONNECTSTRING = (DESCRIPTION ="& _.

    "(ADDRESS =(PROTOCOL=TCP)"& _

    "(HOST = HostNumber)(PORT=PortNumber))" & _

    "(CONNECT_DATA = (SID = SIDNumber))); UID = username; pwd = password; »

    con. Open (strcon)

    If err. <>Number 0 then

    MsgBox ("Oracle error:" & vbCrLf & err.) Description)

    On the other

    MsgBox ("Oracle DB Connection successful.")

    End If

    End Sub

    I'll replace it with the values of host origin...

    Thanks for the suggestion you till u gave...

    complete solution is in the link below...

    https://itkbs.WordPress.com/2014/07/28/how-to-install-ODBC-driver-for-Oracle-in-Windows-7/

Maybe you are looking for