vba

How to link VBA app against debug mode COM DLL

I am trying to debug an VBA excel app that invokes some functions from a C++ COM DLL. I have added type library of the COM DDL in Tools--->References. If i build the DLL in debug mode, VBA app complains about not finding the dll at run-time. When i build the DLL in release mode, i am unable to debug it. Does anyone knows how to link VBA...

Can the Cisco VPN API be accessed from VBA?

There is an API for Cisco VPN (vpnapi.dll). Is it possible to use this API from VBA code? Thanks! ...

Use Excel VBA to fill out and submit Google Docs form

I'm trying to do something like this post but with Excel VBA. I would like to submit a response on a google docs form each time a button is pressed on an Excel add-in. The addin will be an XLA file and written in VBA. I want to be able to collect what features the users are using. If someone has a better solution, I'm open. ---Edit---...

MS Access Import from Text File problems

I'm trying to import a text file into an access database. It's not one I've written myself but the spec for the delimited text file is set up properly and the file imports properly using the wizard. When I try to use the import functions of the app itself, the ImportError table tells "Field Truncation" for one of the fields. Any help wou...

What is an HTMLSelectElement and an HTMLInputElement?

I'm attempting to learn VBA by reading through someone's code and understanding what happens every step of the way. However, I'm confused at to what these two elements are: What is a HTMLSelectElement? What is a HTMLInputElement? ...

Why clone an MS-Access recordset?

I'm a newbie at VBA and attempting to understand someone else's code. Set rstClone = Me.RecordsetClone rstClone.MoveFirst Why does the recordset have to be cloned? Why can't the code be Me.Recordset.MoveFirst? ...

How do you hyperlink to Word 2007 help pages?

I want to hyperlink to a page within the Word 2007 Object Model Reference documentation, that ships with Word 2007. These are webpages that use the ms-help:// protocol that Firefox cannot understand. So I wanted to specify the ms-help:// path of the help page as a command line argument to the viewer, CLVIEW.EXE. C:\Program Files\Mic...

Excel VBA: how to cast a generic control object into a ComboBox object?

Hi, I need to cast a generic VBA form control object into a ComboBox object so that I can add items to it. The generic object won't allow me to insert items into my existing lists Dim ctlCurrent As MSForms.Control For Each ctlCurrent In frmItemInput.Controls If TypeName(ctlCurrent) = "ComboBox" Then Dim lbCurrentComboBox As...

How to avoid circular reference when excel cell update

Hi, I'm writing a set of functions in c++ which can be called by excel. However, these functions are asynchronous, therefore no immediate return values available. Once a result is available I used a callback function through VBA which update the result to the relevant cell which called the functions. But, here I'm having circular func...

Save an embedded Word document in an Excel spreadsheet to disk using VBA.

We have a Excel spreadsheet that currently generates a report using a Word template stored on the company LAN. This works fine for internal users but not for anyone not connected to the LAN e.g. laptop users. Management does not want to distribute the template as a seperate file to external users but would prefer to embed this into the ...

How to refresh ALL cell through VBA

Hi, Is there anyway to trigger (from VBA) excel asking it to reevaluate ALL its excel cells ? thank You ...

Use VBA code to click on a button on webpage

I am editing a vba program and want to code the vba to click on a button in a webpage. The html for the button is: <input type=image src="/lihtml/test_button3.gif" align=left alt=File_Certificate_Go> I imagine I would have to set a variable to getElementBy??? and then variable.click, but I can't figure out how exactly to get the eleme...

With ADO, how do I call an Oracle PL/SQL block and specify input/output bind variables (parameters?)

I am trying to call a PL/SQL block with ADO and VBA, but I can't pass input and/or output bind variables (probably aka parameters). dim cn as ADODB.connection ' ... open connection ... dim plsql as string plsql = "declare" plsql = plsql & " num_in number := ?;" plsql = plsql & " num_out number; " plsql = plsql & "begin" pls...

An HTMLInputElement gets clicked, and an HTMLOptionElement gets...

I'm am trying to write vba code to fill out web-forms and click buttons for me. I am looping through the various option tags on the page to select the one I want. When I reach it, I want to select it, but I'm not sure of the syntax. Dim htmlO As HTMLOptionElement For Each htmlO In Object.getElementByTagName("option") If Trim(htmlO.v...

VBA - Mail Merge via access

Hi, I'm not sure why my code is not working.. I have code in vba in Access 03 which opens a word document which runs a mail merge process. When the code runs, it asks me what the Header Delimiters are. I specified those in the export file as a comma for a field delimiter and as the record delimiter. After I confirm this in word, I get...

VBA - Read file byte by byte on system with Asian locale

Hi, I am trying to convert a file from binary to text, by simply replacing each character with the hexadecimal code. For example, character 'c' will be replaced by '63'. I have a code which is working fine in normal systems, but it breaks down in the PC where I need to use it as it has default locale set to Chinese. I am using the foll...

Setting categories using VBA on a selection does not seem to work in Outlook 2007

I'm trying to set the mail message categories for the current selection. When I run the macro I end up in only a single message being set to the given categorie. I Use the following code (and have also tried to use a do until..loop using the selection.count): Sub SetSelectionComplete() Dim mailMsg As MailItem For Each mailMsg I...

Macro across multiple word documents

I am working with a small company who is slowly moving to MS access. Currently all their reports live in multiple MS Word documents. During this transition they need to not only keep the word documents up to date, but also feed the information into the database. (Basically remove the need to double enter data). Is there a way that I can...

SQL UNION ALL problem after using UNION ALL more than 10 times

I'm getting a formatting problem if I use more than 10 UNION ALL statements in my VBA Code. If I use 10 or less everything works great. What I'm trying to do is combine 12 worksheets (Excel 2007). I have a numerical column called SC that turns into string and date if I have more than 10 UNION ALL. If I try to use ROUND with more than ...

MS Access 2003 - Is there a way to programmatically define the data for a chart?

So I have some VBA for taking charts built with the Form's Chart Wizard, and automatically inserting it into PowerPoint Presentation slides. I use those chart-forms as sub forms within a larger forms that has parameters the user can select to determine what is on the chart. The idea is that the user can determine the parameter, build the...