I need to write a macro in VBA that will open every file in a given directory one by one and run a macro on them.
so far i have something like
for i = 1 to number_of_files
open Dir("C:\yourPath\*.*", vbNormal)
call some_macro
close file
next i
...
Anybody have some VBA code that will store a byte array into a MySQL blob column?
...
FINAL EDIT: It does indeed appear to be a compiler bug - see the accepted answer.
Using VBA within Excel 2007, I have the following code in 'Class1':
Option Explicit
Public Function strange(dummy As String, ParamArray pa())
Debug.Print pa(LBound(pa))
End Function
Public Sub not_strange(dummy As String, ParamArray pa())
Debug....
Hi, just a quick question.
I've got this table in a Word template which have two columns by default.
Then I've got this button the user can press if he wants another column. The macro run inserts several text placeholders and formats certain things automatically.
But what I want is some sort of routine which basically checks the numbe...
I have an Access database currently. There is a backend, and there are multiple users who use this database with their own front end. The size of the data is very small; however there are several forms that are constantly in use.
I need to migrate the data to MySQL. Should I continue to use an Access front end or program my own c# front...
I have this tool where employee information needs to be updated. I call in the MDB data to excel in one sheet. Now I use vlookup to see what is there and change it if needed.
I have tried some tricks however some thing seems to be wrong.. please help.
Sub update()
Dim cn As Object
Dim rs As Object
Dim a As String
strFile = "D:\temp exc...
I have a ListBox with various rows of data (items that someone is buying, basically), and when the user clicks on a row it populates a textbox on the side with the quantity of how many of that thing he's buying. For example, one row might be "Pencils, $5, 3" and clicking the row makes "3" appear in the textbox.
If the user changes that...
Hello all. I have a set of data in Excel which is like the below (in CSV format)
heading1, heading2, heading3, index
A , randomdata1, randomdata2, 1
A , randomdata1, randomdata2, 2
A , randomdata1, randomdata2, 3
B , randomdata1, randomdata2, 4
C , randomdata1, randomdata2, 5
I want to be able to auto build a word document that presen...
Hi all
I've got a COM object implemented in .NET and its definition it has a function
F(IData [] data). When I try to use it from VBA, I get the 'Function or interface marked as restricted. or the function uses an Automation type not supported in Visual Basic'.
I believe this error has to do with the fact that the function receives IDa...
for example:
variable1=Dir$(some_path)
vs.
variable1=Dir(some_path)
what is the difference?
why not just do:
variable1=string(Dir(some_path))
...
this is how i can open an excel file in vbA:
Workbooks.Open(file-path)
is there a way to specify that it should be open as read-only? the files im opening have a password on them and i always get the dialog that it can only be open as read only.
...
does anyone know if there a vba style compiler/gui for python. i am using the regular IDLE and it is difficult to navigate from function to function. with the VBA editor you are able to skip from function to function with a listbox. does anyone know if such a thing exists for python?
...
I have an excel csv file that i am uploading to sql server table using sqlbulkcopy,data in excel looks like this
121 **ABCDEFG** 138.00 141 XYZ
**HIJKLMN**
**OPQRSTUV**
So basically this 3 line make a single record in table,how should i merge these 3 line comments in one ?
...
in excel there is a frequency function:
The Excel FREQUENCY function This
useful function can analyse a series
of values and summarise them into a
number of specified ranges. For
example the heights of some children
can be grouped in to four categories
of [Less than 150cm]; [151 - 160cm];
[161 - 170cm]; [More than 170cm...
I'm trying to connect various VBA projects to an Oracle 10g back end using ADO (2.8) and no TNS. After various attempts, we've decided that the simplest series of steps for a clean installation include:
Set up an Oracle Instant Client
Install the accompanying ODBC driver
(Test the connection using EZCONNECT via SQL Plus)
(Test the conn...
Hi,
I'm connecting to a Jet 4 DB through ODBC.
The Jet DB uses pass-through queries to an Oracle DB. This works so far (can't access the p-t queries directly, but creating a view on the query does the trick).
I need some subset of the data returned by the p-ts. Parameters would be best, but are not supported.
Two questions:
1) Jet d...
Hello,
i'm new to this kind of things. Kinda the first post ever regarding programming, since till now i managed to google everything that i needed. Thanks for your patience:) .
About my problem/goal:
On our project we will have to have some kind of documentation management control. We will have around 160 .docx files (all files are al...
I need help writing a sub routine for my program in excel. What I am trying to do is take information from one sheet (Bar code master) and fill it in to another sheet(Template). I recorded a macro and that got me to the point of copying and pasting info. On the bar code master sheet I have the range of bar codes listed with the beginning...
I'd like to configure a hotkey, in MS Outlook, which does the following to the highlighted/selected messages:
Mark as read (by default it's [crtl]+Q)
Move to an "archive" folder (archive meaning a folder other than the default inbox)
This should happen whenever I press [crtl]+M (assuming it is not already reserved), on any amount of ...
I know that docmd.close will close the current form but for some reason I have gotten it in my head that I want to be more explicit. What I do is docmd.close acForm, me.name.
Is that totally crazy or is there a good reason to do this?
...