I'm using VBA in Excel 2010 to make a simple birthday reminder program. I have a column of dates (Column D). How do I check if a cell is within one week of today?
I'm not sure what the VBA syntax for the conditional statement would be:
For i = 2 To MAX_ROW
cell = ActiveSheet.Cells(i, 4)
If (Date(cell) - Date(Now()) <= 7) Then
...
Hello,
I am trying to retrieve an ADODB recordset from a function in MS-Access 2007 but get a very annoying error message thrown in my face saying: "Argument not optional (Error 449)".
I really can't figure out what I am doing wrong, please help!
Regards,
Stefan
FUNCTION:
Function Rs(sourceSQL As String) As ADODB.Recordset
' Creat...
Is there a way to copy an Access 2003 pivot table view (used to pivot 206,000 records) to Excel 2003 using VBA?
...
I'm trying to create a dropdown that upon changing the selection from the list of options will run a query that will insert the query results into the page. Here's what I have thus far:
Sub DropDown1_Change()
Dim dbConnect As String
Dim leagueCode As String
Dim leagueList As Range
Dim leagueVal As String
Dim TeamDat...
I am trying to get resultset from SQL 2008 sproc into Excel 2003 using VBA.
It worked for few sprocs but when I tried the one which uses temp table or table variable VBA fails with err 3704 "Operation is not allowed when the object is closed" on the following line:
Sheet1.Range("A2").CopyFromRecordset rsMyDB
If I comment out select i...
I have string "ololo123".
I need get position of first digit - 1.
How to set mask of search ?
...
Need to found any symbol of array.
For example:
replace(string,[a,b,c,e,f,g],"a1b2c3d4e567");
result = "1234567"
How do it ?
...
Hi, I'm trying to make a macro that formats a chart in Excel 2003 where the data changes. Basically, I have a 20 X values and Y values at all times; however, the values are data specific (I'm making stock price charts that will change depending on the stock I'm analying). I'm trying to make my Y-Axis cross the X axis at the value in ce...
I am working on a VSTO PowerPoint add-in which involves recording and playing sounds. I was requested at the last minute to allow users to pick the device that will play the sound, like Skype does.
In general, I don't think it is possible to specify what device PowerPoint should use, except by selecting the default device in the contr...
is there a way to get the name of the computer in VBA?
...
i am doing this:
MsgBox ActiveWorkbook.Name
and getting the above mentioned error.
please note that this has worked for many months and now all of a sudden it does not workl
what can i do to fix it?
...
Here is some code I have to remove duplicate occurances of catid & recid in tblcat1_rec table, leaving only 1 entry:
mysql = "DELETE FROM tblcat1_rec "
mysql = mysql & " WHERE ID <> (SELECT Min(ID) AS MinOfID FROM tblcat1_rec AS Dupe "
mysql = mysql & " WHERE (Dupe.catid = tblcat1_rec.catid) "
mysql = mysql & " AND (Dupe.recid = tblcat1...
I have a table with phone & fax data in an "address" column that I want to put into their separate "phone" and "fax" column.
The phone comes in a various forms:
phone, T , ph, tel., tels., fono. The same issue occurs with fax, i.e. Fax & F.
Ideally, I think the following is a good description of the data.
Not all numbers pertain to p...
How Do control with python multiple instances of Excel. This is not read/write, but more running macros on different workbooks.
Ex:
Excel.exe running Book1.xls. has mac1
Excel.exe running Book2.xls. has mac2.
I got one instance to work, this first instance, which use 2003.
I could not figure out the other instance which is 2007.
I...
I am trying to convince someone that using an external DLL to manage sql data is better then using stored procedures. Currently the person I am working with is using vba and calls sql stored procedures to get the complicated data they need from many different sources. It is my understanding that the best way to go about this kind of acti...
I'm looking for any available free Excel "helper" classes that are written for .net (doesn't have to be C#).
I'd like to evaluate what others consider to be useful and generic static (and non static) helper methods.
Can be targeted at VSTO or regular Office automation, although that probably doesn't matter.
I guess I should also point o...
I need to go through each shape of a smart-art in PowerPoint 2007.
When shape.Type=msoSmartArt then I could simply go through the shapes in shape.GroupItems.
However, when shape.Type == msoPlaceholder && shape.PlaceholderFormat.ContainedType==msoSmartArt
then shape.GroupItems is empty. How can I access the smart-art shapes in such a cas...
I know there's a property to add in the beginning of the macro so that all the selections and deselection happen in the background and are not shown on the sheet. I think I had to disable some property at the beginning of the macro and enable it at the end. Does anyone remember what it was?
...
I'm populating a spreadsheet with Database values.The cells that I fill data with,I want them to be only read only to the users.How can I do this
...
I have a C# COM interop object that accepts a List of String[] arrays. Trying to pass something that somewhat resembles a List of String[] Arrays to be passed from my VBA Access 2000 application, to my C# COM object. I already have the object written out and I'm a little frustrated because I know little about VBA. Thank you in advanced! ...