vba

Get the content of a sharepoint folder with Excel VBA

Usually I use this piece of code to retrieve the content of a folder in VBA. But this doesn't work in the case of a sharepoint. How can I do ? Dim folder As folder Dim f As File Dim fs As New FileSystemObject Set folder = fs.GetFolder("//sharepoint.address/path/to/folder") For Each f In folder.Files 'Do something Next f EDIT (af...

How do I access SQLite from VBA?

I have an Excel workbook that has some adodb code that queries a local access database. I want to do the same for SQLite as I believe that will provide better performance. How do I do that? Can I connect to an SQLite file using adodb or odbc? I need something simple that I can deploy so that if i can minimize unnecessary configuration a...

Using VBA / Macro to highlight changes in excel

I have a spread sheet that I send out to various locations to have information on it updated and then sent back to me. However, I had to put validation and lock the cells to force users to input accurate information. Then I can to use VBA to disable the work around of cut copy and paste functions. And additionally I inserted a VBA fun...

Pros and Cons of VB & VBA?

On another programming related website, I saw this line in someone's signature. This is NOT the first time I've seen such sentiments, although this is the harshest: "People who work in VB or any variant thereof are not programmers, they are circus chimps throwing feces into an IDE..." VBA is my bread and butter and I can auto...

copy Ms access single Big Table to Sql server two small tables

Dear friends, I have single big table in Ms access 2k daabase and i need a way to copy this table and then populate my two already ready tables on sql server . I can use Migration tool but is there any way we can do it from Ms access like a form which executes the stored procedure or ODBC connection. what i am thinking is to create a ...

Return a User Defined Data Type in an Excel Cell

I've searched the web and I've searched the questions here on stackoverflow, but I haven't been able to find a solution. Here is what I'd like to do: Suppose I have the following code in a class module named "MyClass" Option Explicit Dim var1 as integer Sub Initialize(v as integer) var1 = v End Sub Function GetVar1() GetVar1 ...

COM Interop without regasm

I'm a limited user, and I need to write an Outlook macro that exposes a C# library in Outlook 2003 and 2007. I do not have any admin privilges at all, not even at install time, so I can't run RegAsm and I can't (I assume) write a managed add-in. Is there any way to call .Net code from VBA in this scenario, or are there any other solu...

How to set the hyperlink to the A1 cell of each seat in Excel VBA?

As a state of the seats of Excel ... There are plural seats. The first seat name is "list" The other seats get possible to move in hyperlink from the list sheet. the seat name are "example1", the "example2" . Please teach VBA setting hyperlink to "list" sheet to the A1 cell of each seat ...

VB.NET equivalent of optional Range argument in VBA function

I have an Excel VBA function that takes a number of optional parameters, including an optional Range: Function DazBeta(A As Range, Z As Range, _ B As Integer, _ Optional Freq As Integer = 1, _ Optional c As Double = 0, _ Optional r As Range, _ Optional Pct As Boolean = True, _ Optional Lab...

VBA WS Toolkit, how to get current File as Byte Array

Using VBA I want to send a copy of the current word document to a web service? How can is get the current document as a Byte Array? I know how to use the web service just not sure how to get the current file as a binary object to send? p.s. I have only been using VBA since this morning =) So simple answers are appreciated ...

executing word mail merge from excel macro

Is it possible to start MAIL MERGE from excel macro (by clicking a button on sheet) I have excel sheet with data and want to export it to new word doc. ...

Storing Range attributes as an object?

I'm having trouble with the way I designed this little report I'm making. Is it possible to create a variable for a Range object in Excel VBA, for the purposes of applying the formatting to another Range? Here is my example: I'm creating a dictionary from the Microsoft Scripting Runtime library: Dim d as Scripting.Dictionary With t...

ms-access: brackets around a listbox?

these are both listboxes. why does one have brackets around it? [relationslct].Value = other_relations_lst.Value ...

ms-access: listbox.requery

when i am running the following code: listbox1.requery which query is this going to run? where can i edit this query? ...

ms-access: listbox is not displaying data

the row source for a listbox looks like this: SELECT users.id, users.first, users.last, chavrusas.luser_type AS user_type, chavrusas.id, users.title, users.city, users.state, users.home_phone, users.email FROM Users INNER JOIN chavrusas ON Users.id=chavrusas.luser_id WHERE ((chavrusas.ruser_id)=id_txt and chavrusas.ended=false) AND (c...

Read Excel rows, mark rows read

I need to use VBA to read rows out of Excel into another application, but if the process dies in the middle, I need to know which rows were read. Is the best way to put something in a column, per row, that says that row was done? Then save it after every row is read? Doesn't seem like a great way. Any help would be great. Thanks eve...

ms-access listbox weirdness (memory issue?)

i have a huge sql query that is attached to the rowsource of a listbox. the SQL statement seen here: http://stackoverflow.com/questions/1358642/ms-access-select-from-another-query actually returns the correct information if that information is under 2 records. however if it returns more than 2 records it still populates the listbox...

What is the great wisdom in defining your own object if I can't do this?

This is for Excel and VBA. Assume that BondClass has been properly defined in a Class Module. I get a #VALUE! when I type "=GetBondPrincipal()" into an Excel cell. Have I done something syntactically wrong or is this just not possible in Excel/VBA? I ask because what I really want to do is this: http://stackoverflow.com/questions/1354046...

Excel Macro to Copy and Paste Format Line by Line instead of range of cells.

I am using conditional formatting in Excel 2007 to compare values row by row in cells H, K and U. Since I am trying to use the conditional fomartting row by row instead of a range of cells. My hand cramped up by row 50, and I have another few hundreds to go. Is there a macro that would check the rows and paste the format without having...

What is the purpose of BOUND COLUMN property of listbox in MS Access?

What is the purpose of BOUND COLUMN property of listbox? ...