vba

Is it possible to generate a PowerPoint roadmap timeline from C#?

I know PowerPoint has an API like Excel and word. Is there anyway to generate a timeline roadmap programatically (I have a list of milestones and dates from a database)? Does anyone have any links or example code on how to get started on trying to programatically fill out a timeline roadmap template in powerpoint Here's a (not great) ...

What causes MS VB Run-time Error -2147417848 (80010108) in Excel Macro

I have a macro which runs fine on my machine but when I try to run it on another machine it gives the following error. Microsoft Visual Basic Run-time Error -2147417848 (80010108) Automation Error The Object invoked has disconnected from its clients. ...

Connect to MySQL database from VBA without having MySQL installed

I can connect to a remote MySQL db from an Excel workbook on my machine no problem using the following connection string: Driver={MySQL ODBC 5.1 Driver};Server=server;Database=database;user=user;Password=;Option=3; ..but when others try to use the same workbook the connection can't be made ("Data source name not found and no defaul...

Excel VBA - out of memory error (runtime 7)

Hey guys, I am getting a very weird error when using VBA in excel. I am using LotusNotes Automation libraries to loop through a view and write everything to cell. Here is my code (variables of non-interest are removed as I know they are not causing the problem) Public Function TimeCh() Set session = New NotesSession 'create a new se...

How to wait for execution control to return from dropping a table?

I have the following code: CurrentDb.Execute "DROP TABLE [" & DatabaseName & "].[" & TableName & "];" Which will drop a table from an MS Access database. Typically this is being done using a database on a shared network. How can I ensure the DROP method completes before allowing the control to move on to the next line in my code? T...

Adding data from Excel to Mysql via VBA

UPDATED QUESTION...SEE BELOW I have an excel sheet which accesses a MySQL db as a backend.... I insert new records into MySql the following way, but I am not sure if this is the best way. For rowline = 1 To 50 strSQL = myquerystring (INSERT 5 columns per excel row) rs.Open strSQL, oConn, adOpenDynamic, adLock...

VBA - Assigning a Uselected Value in a Combobox (userform) to a Variable

I have a combo box in a userform in VBA and want to make the user selection into a variable. IE, I have a combobox with values 1-50 and want to take the number they select and use it as a variable. Thanks. ...

MS Access VBA = Now() with time trim

So the function =Now()....is there a way I can use this and only get the date, not the time? or is there just a function for this idea? thanks Justin ...

Excel Macro to Generate SQL From Sparsely Populated Sheet?

I have a worksheet that has been sparsely populated with data that needs to go into several relational database tables. The sheet looks like this: A B C D E F G Table_1 Table_2 Table_2 Table_3 Table_3 Table_3 Table_3 Table_3 Table_3 Table_3 Table_3 Ta...

Why could this process have crashed?

I have an 8AM Access macro that verifies certain SQL tables are up to date. For business logic reasons, the Access file is stored and run on both my local machine and a virtual machine. It's pretty simple and almost always runs without problems: Windows task scheduler kicks off an Access macro. The macro runs queries on several tables...

PPTX 2007 - VBA: If I create a powerpoint pres from access code behind form, then how do i prompt to save ppt file at end

I have an access form that creates a ppt file (set of slides) from the information in the access form/tables. I use a template file in a utility folder that is in the same folder as the access file itself. everything works fine, except one little piece. I would like to know how after I have ran through everything else in the sub routin...

How do I create a VBA macro that will graph a changing range?

Hello, Currently, I have a table that will automatically update when new data is added to a spreadsheet. I am able to easily create a macro that will graph a set range, but how do I get it to automatically update the range so that it graphs all the right data? My goal is to be able to create a button that I can press at any time that wi...

manual or programmatic way of creating keyboard short-cuts for excel add-ins

is it possible to have a shortcut like ctrl+p to run a certain macro? is there a manual or programmatic way to do this? ...

MS Access 2003/2007 VBA - How can I take a date field from a recordset and string the dd-MMM-yyyy format?

i have some VB that uses DAO to grab some data, one field being a date field (as in date of a transaction). its not date/time, just simply date like dd/mm/yyyy. so on an access form i know how to do this, but right now i am working on some excel/ppt automation. i use something like this simple example DAO sql string, openrecordset to ge...

Why doesn't this for loop process the full data set?

Background I have a spreadsheet of ticket allocations for an event. On each row of the spreadsheet is a name and the number of tickets allocated. I need to change the spreadsheet so that each name is duplicated once per ticket on separate rows, like this: I have a macro to do this, however it exhibits strange behaviour The Proble...

opening worksheet in background

here's the process that i am running from a macro: i open a worksheet i add data to the worksheet i save it i close it and i repeat the steps: 1, 2, 3... etc. (when i say I, i mean the stupid macro) is it possible to open the worksheet in the background so that the user doesnt actually see that the worksheet is being opened? ...

Transmit a Word file to a database or FTP at the click of a button?

I would like to be able to send the contents of a merged word document to a database, either on a button click on the menu bar, or when closed (if saved). I've found some working code but have a problem trying to modify it (VBA noob) 'Written: June 11, 2008 'Author: Leith Ross 'Open the Internet object Private Declare Function Inter...

MS Access 2007 VBA - Can I Add font properties in VB Format$ function

so if I have a DAO recordset returing values, and I use Format$, is there a way to set the font property of what is only contained within the Format$ portion? For example I have this: "Metric #43 = " & Format$(rs!Metric43, "Yes/No") so this is actually for ppt automation, not an access form. I want the first string to be unbold, and ...

MS ACCESS 2007 VBA : DAO recordset....how can I view all the "fields" in the returned collection

so if i do a SQL statement like so: sql = "SELECT * FROM tblMain" set rs = currentdb.openrecordset(sql) what method can i use to view every "field name" in this collection i have just created. i am getting some very strange error stating that the item is not found in this collection. i know the field exists in the table, i have...

Sending http requests with VBA from Word

I'm trying to send data from a word document to a web page. Ive found some code and pasted it into a new module and saved it, but when I run it I get "compile error, user defined type not defined" Sub http() Dim MyRequest As New WinHttpRequest MyRequest.Open "GET", _ "http://www.google.com" ' Send Request. MyRequest...