vba

How to run a macro "OnEnterSlide" or "OnLeaveSlide" in Powerpoint VBA ?

Is there some kind of event which allows to run a macro any time one enters a slide or leave a slide ? ...

How to automatically trigger the App Object initialization in Powerpoint ?

It is said here: http://msdn.microsoft.com/en-us/library/aa211599%28v=office.11%29.aspx Before the procedure will run, you must connect the declared object in the class module (App in this example) with the Application object. You can do this with the following code from any module. Dim X As New EventClassModule Sub ...

Weird bug on powerpoint vba

I have a "mynote" textbox on a slide. If I execute: Sub test() If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then MsgBox "ok" End If end sub It works. But If I attach a shape with this macro: Sub test(oShape As Shape) If ActiveWindow.Selection.SlideRange.Shapes("m...

Centralised/shared COM DLL, possible?

Hi, We have a system that makes a use of 3rd party COM DLL written in vba We have a centralised web application and 1-50 client machines that must reference that COM DLL in order to use our centralised web application. The COM DLL is going to be updated rapidly in the future, which means that it has to be re-installed on every machine...

can i run c# code from vba macro?

is it possible to include some kind of libraries inside of VBA that will enable me to use c# functions that i wrote? ...

access: read CSV file into table

is it possible to programmatically have access open a certain csv file and read it into a datasheet and set parameters like what time of delimiter, TEXT QUALIFIER etc, including all the steps that one takes to manually import a csv file into a table? ...

MS Access: Why is ADODB.Recordset.BatchUpdate so much slower than Application.ImportXML?

I'm trying to run the code below to insert a whole lot of records (from a file with a weird file format) into my Access 2003 database from VBA. After many, many experiments, this code is the fastest I've been able to come up with: it does 10000 records in about 15 seconds on my machine. At least 14.5 of those seconds (ie. almost all th...

What is the correct "Document Name" of an Access ADP/MDB to use in the GetObject("Document Name") call?

According to http://support.microsoft.com/kb/288902/en-us You can attach to a specific instance if you know the name of an open document in that instance. For example, if an instance of Excel is running with an open workbook named Book2, the following code attaches successfully to that instance even if it is not the ear...

Create bookmark into 1st column of MSWord table

Hello All, does anyone have a VBA code to create a bookmark into the first column of an MSWord table? Let's say I have a table looking like this .-----.----------------. . ref . Title . .-----.----------------. . 1 . Title 1 . .-----.----------------. . 2 . Title 2 . .-----.----------------. . foo . Title 3 ...

ms-access: specifying formatting for a column

i would like all data that is entered into a specific column to always have a trailing comma and also i need the first character to always be a comma. how do i do this? the best solution is probably not in vba or sql but probably the properties of the table? ...

read text file line by line and insert/update values in table

i am exploring the option of whether DoCmd.TransferText will do what i need, and it seems like it wont. i need to insert data if it does not exist and update it if it does exist i am planning to read a text file line by line like this: Dim intFile As Integer Dim strLine As String intFile = FreeFile() Open myFile For Input As #intFile ...

if exists, update, else insert new record

i am inserting values into a table if the record exists already replace it, and if it does not exist then add a new one. so far i have this code: INSERT INTO table_name VALUES (value1, value2, value3,...) where pk="some_id"; but i need something like this if not pk="some_id" exists then INSERT INTO table_name VALUES (value1, v...

How to insert hyperlink into access database via sql?

I have a fairly simple MS Access Database that contains some metadata about a bunch of documents and a hyperlink field that links to the document on our network drive. However, when I use a SQL INSERT statement to populate the hyperlink field, the value I give it only becomes the display text, not the actual link. How can I make the va...

Excel vba -get ActiveX Control checkbox when event handler is triggered

I have an excel spreadsheet that is separated into different sections with named ranges. I want to hide a named range when a checkbox is clicked. I can do this for one checkbox, but I would like to have a single function that can hide the appropriate section based on the calling checkbox. I was planning on calling that function from t...

solution for updating table based on data from another table

i have 2 tables in access this is what i need: 1. if the PK from table1 exists in table2, then delete the entire record with that PK from table2 and add the entire record from table1 into table2 2. if the PK does not exist then add the record i need help with both the sql statement and the VBA i guess the VBA should be a loop, going...

IN 'mytextfile.txt' syntax - access

i would like to use this syntax to update a table in access based on data from a txtfile. fenton in his comments on this answer: http://stackoverflow.com/questions/2992168/read-text-file-line-by-line-and-insert-update-values-in-table/2992337#2992337 said that this is possible and i would like to see the exact syntax please ...

How to use version control with VBA code?

I am developing a VBA application which is quite large. I want to use SVN for that application developing. How can I split my modules from the Excel document and how to upload my modules separately to source control? Please help me. ...

Adding Items To A Combo Box Without Code?

I want some default values in my combo boxes but can't seem to figure out how to do this without writing a module that populates the combo boxes. How can I manually fill in the combo boxes so I don't have to use code to do something so simple. Thanks ...

Removing All Items From A ComboBox?

How can I programmatically remove all items from a combobox in VBA? ...

OnOpenExcelWorksheet Event To Trigger When Worksheet Opens?

How can I run code when a Worksheet opens? (The code that I want to run is contained in the opening worksheet) ...