vba

Macro not in the list after loading the add-in.

I have a created a macro show() and saved it as display.xla and open a new workbook and added the display add-in. But when i went to Tools->Macro->Macro.. its not the list, But if i type display.xla!show and click run im able to execute it. Is there anyway to display the macros stored in the Add-in.? Apart from having it in personal.xls...

Word VBA: How to know if the actual save operation is completed?

I am having a problem with the Document.SaveAs method in Word VBA with large Word documents, it seems that the save operation is asynchronous, ie. after calling .SaveAs it returns immediately, but with large Word documents the actual save operation may not has been completed and it's in progress in another thread. So what I want to ask...

Access 2007 - Data provider could not be initialized

Hi all, I converted Access 2000 app to Access 2007, the App is connect to MsSql-2000 with ADO. 2 Problems: 1. I can not do filter on the form (right click -> filter) - returns nothing. 2. I keep getting "Data provider could not be initialized" mostly when I'm trying to play with the filter somebody has an idea? ...

Rename Worksheet Event in Excel

What is the best way to get some VBA code to run when a excel sheet is renamed? ...

VBA Zip File error

I am using code similar to the below to add some files to a zip folder: Set oApp = CreateObject("Shell.Application") oApp.Namespace(CVar(strDest)).CopyHere CVar(strSource) This works fine most of the time, but sometimes I get an error: "(Compressed (zipped) Folders Error) Cannot create output file". This error is raised asynchronousl...

One Central Header/Footer used by Multiple Docs (Word 2003 or 2007)

Inside Word (2003 or 2007), is there a way to have one Header/Footer that is used by Multiple documents? I want to be able to change the header/footer in one spot and have it affect multiple documents. i.e. I have 50 documents and they all have the same header/footer. Instead of opening all 50 documents to make the change, is there a ...

How to: Excel Ribbon with multiple Workbook-level ribbon items with dynamic attributes?

I am trying to work out a solution to share most of my VBA codebase across workbooks. This involves creating a .xlam file that would contain the shared modules & classes (+ their respective factories). I'm willing to use Office 2007's wonderful RibbonUI, and have that .xlam file declare a custom tab (Let us call it MyTab for the sake of...

excel programming

I am new to Excel programming. What are the differences among UDF, Macro, Add-in, Automation Add-in, XLL, VSTO which one I should use and under some circumstances? Thanks! ...

How to get IDispatch information from a variant property in a Delphi com object in VBA?

I have a COM object written in Delphi that has a property that returns a variant. Basically this property returns a value depending on the parameter I pass it. When I access the object from VBA (Excel for example), I can write something like : MyObject.MyProperty("IntProperty") = 22 Now the property can also return an IDispatch object...

Excel 2007 Combo Box - Developer Ribbon vs. VBA Module

Could someone please explain to me the difference between the combo box that's available via the Developer Ribbon in Excel 2007 vs. the Combo Box control that's in the VBA editor? I cannot get this simple line of code to work using the Developer combo box: MsgBox Combo1.Value I've tied it to the change event and it seems to be syntact...

How do I add a "browse for file" dialog box to the transferText command?

I'm creating a macro in MS Access that imports a CSV file into a table. I'm using the TransferText action to import the CSV string, and I want to allow the user to browse for the file that contains the CSV string. How do I show the "browse" dialog box to enable the user to choose the file? ...

compare date/time via VBA with date/time in Access DB

Hi, How to compare a date/time via VBA with a date/time in an Access DB? The query I use adoRS.Open "SELECT * FROM currentpositions WHERE ((currentpositions. [dateLT])=" & "#" & date_from_message & "#" & ")", adoConn, adOpenStatic, adLockOptimistic I only achieve to compare a date. Anybody an idea? Regards Camastanta ...

Build add-in for VBA IDE using VB.NET

I have asked this elsewhere, but have never found anyone knows how to build an add-in for VBA IDE using VB.NET. Is it even possible? Could someone point me to an example? ...

Can I use VBA to unzip a file using the native windows unzip feature?

I'm using Outlook 2003 & I want to use a macro to unzip a file attachment on a message. Can I use the built-in zip file handling of windows in VBA to do this and if so, how? I'm running on Windows7 64 bit. ...

VBA/Corel Draw: How to send binary and text file in HTTP POST request to server from VBA/VB6 script running from Corel Draw 12/X4?

I want to send Corel Draw .CDR drawing binary files and XML SVG files from the application to a server via HTTP POST. I have done some research and this existing post seems closest but doesn't work for my situation: http://stackoverflow.com/questions/158633/how-can-i-send-an-http-post-request-to-a-server-from-excel-using-vba I've added...

Excel picture tools format vba

In excel & word 2007 there is a picture tools tab that shows up in the ribbon when you insert a picture or clip art and there is the smart art. Is there a way to manipulate these objects and settings (e.g. transparency, position, effects etc) in vba. A macro doesn't seem to work for me either. ...

Copy data from multiple rows only if data exists.

I have a spreadsheet named "Data Sheet" that collects data from other worksheets via formulas and works perfectly. I need a macro that will copy the data from multiple rows so I can paste into a seperate workbook. I have 30 rows of data ranging from A3:EI3 to A32:EI32. This data is collected from 1 to 30 other sheets if they are made vis...

Inserting multiple rows to table - Access

Hi, I have an Access application in which I need to do a 'mass-update'. I have a form on which I have a dropdown, a listbox, and a checkbox. I also have a Update button, and when the user clicks it, I want to insert rows into my table with the same value for the dropdown and checkbox fields in all the rows, but I want different values f...

MS-ACCESS: displaying the first entry in a listbox

how do i msgbox the first entry in a listbox in ms-access with vba? ...

ms-access: rowsource question

i am a vb.net programmer, and i have done lots of VBA with excel. i am a beginner at access. someone has given me an access database to debug and i am lost. i succesfully made it connect to a local mysql database. i have a listbox on a form that has a rowsource attached to a query called listbox. here's a picture of the properties of...