vba

Using Excel VBA to find a range

I have been given some workbooks which are formatted for the eye rather than anything functional. As such, I have quite a few column headings that look like this: A B C D E 1 'YTD 'Monthly 'YTD 'Monthly 2 Figures' Figures' Plan' Plan' 3 4 Account1 1 ...

Architecture Q - VBA Excel Macro or VS Tools For Office?

Hello, I have requirements from our client where we basically have to 'parse' PDF files from various different sources. The solution we have come with, as 'phase 1' (as we have short time to market and will save them a huge amount of time) is 1) manually use Able2Extract application to pull out the columns you need from the PDF file, ...

vba code in this example

Hi I'm very new to programming and I'm just starting to learn VBA with excel. I came across on this website and did the examples here but I have question about this code: I know the variables are declared using "Dim" statement "Message" here is the variable with a data type of integer. What I don't clearly understand is; what is the m...

Extend Collections Class VBA

I have created a sort function to allow a collection of instances of a custom object to be sorted based on one of the objects properties. Is it possible to extend the existing collections class in VBA? I do not believe inheritance is supported in VBA, so I am not sure how to go about this in the proper way. I could just create a new m...

ADODB.Connection undefined

Reference http://stackoverflow.com/questions/1690622/excel-vba-to-sql-server-without-ssis After I got the above working, I copied all the global variables/constants from the routine, which included Const CS As String = "Driver={SQL Server};" _ & "Server=**;" _ & "Database=**;" _ ...

Is there much overhead involved in VBA classes?

Hello, Is there much overhead involved in VBA classes? I noticed that on a previous workbooks I effectively did the same thing as what's currently in my classes, but it ran faster. ...

prime number in vba excel 2003

Hi I'm analyzing a code from the website and I tried it on my side as well but seems it doesn't work. Could you please tell me why? would greatly appreciate your help. Thanks Private Sub CommandButton1_Click() Dim N, D As Single Dim tag As String N = Cells(2, 2) Select Case N Case Is < 2 MsgBox "It is not ...

MS Outlook macro to strikeout selected text

The task is to apply strikeout to current font in selected text area. The difficulty is that Outlook doesn't support recording macros on the fly - it wants code to be written by hand. For example, the following simple code: Selection.Font.Strikethrough = True works for Word, but gives an error for Outlook: Run-time error '424': Obj...

Any cheap or free IDE's out there for VB6 programming?

Any cheap or free IDE's out there for VB6 programming? or is MS the only way to go? Thanks. ...

Force to support inheritance

For our project, the group use Microsoft Access. The VBA class is capability limited. How can VBA class be made to support inheritance? -Wen ...

Forcing Garbage Collection in VBA/Excel 2000

Is there a way to force garbage collection in VBA/Excel 2000? This question refers to the Macro language in Excel. Not using VB .NET to manipulate Excel. So GC.collect() won't work ...

Ceiling function in Access

Have searched for this, no luck. Can someone tell me how create a Ceiling Function in MS access that behaves the same as the one in excel? ...

How do I convert multiple columns to a single column?

I have a table that looks like this: Col1 Col2 Col3 Col4 a b c d e f g h I need to convert it to this: Col1 New a b a c a d e f e g e h I have a ton of data and doing this by hand is out of the question. Does anyone know of a fast way to do this? I'm hoping that there is a built in way (such as...

MS Access cannot create the MDE Error. Too Many Objects.

So I have a MS Access database at work. Recently I tried to put out another MDE file, that actually took something off a report that was previously there. Now I am getting this error that says, "MS Access cannot create the MDE" with a little show help button....click the show help button and it gives a description about this relating typ...

outlook macro - why doesn't this delete all items from deleted folder?

I have the following macro in outlook to clear my deleted folder. its strange as it doesn't seem to delete all entries. I have to run this a few times for it to clear to deleted items folder. (usually 2 or 3 times). Each time the number of deleted items in the folder does get reduced but i dont understand why everything doesn't get wi...

MS Access 2003 - VBA for SELECT query and only choosing specfic record for form

Okay so on this form, I create a grid, almost looks like a bar chart with little "cells" stacked by month. Each of these "cells" are square sub forms, and I create the little square forms that I use as the sub forms. So what I wanted to know is, what is the code (VB) for running a select query, and only working with specific records wit...

Excel 2003 VBA error 1004 after XML data import

Hi, I built an macro which takes different XML input files and imports each one into a different worksheet in a workbook. It then saves the workbook. This works a treat 98% of the time with hundreds of users, but sometimes fails when saving the workbook with "Error 1004: Microsoft Office Excel cannot access the file 'C:\SymmPiT'. I fou...

How do you use the value of a named cell in a macro in a diferent sheet, same workbook?

I'm just not getting it, I'm using Excel 2003 and am totally confused as I'm jsut not getting it ...can anyone help? I need to check that named value with a number of coulumn headings on the active sheet and then insert a colum to the left of the column holding the matching text. I'm sure that bit is very hard - but I'm not even able t...

Why does Showing a UserForm as Modal Stop Code Execution?

The following VBA code stops at Me.Show. From my tests, it seems that Me.Show stops all code execution, even if the code is inside the UserForm. This part is outside the UserForm: Public Sub TestProgress() Dim objProgress As New UserForm1 objProgress.ShowProgress Unload objProgress End Sub This part is inside the UserFo...

Looping Code/Skipping Rows

I have the following in a piece of VBA code: For i = 1 To 5 myArray(i) = i + 0 Next i For i = 6 To 8 myArray(i) = i + 1 Next i For i = 9 To 14 myArray(i) = i + 2 Next i ...etc There must be a better way to do this, but for the life of me I cannot think of one. Could anyone help? Perhaps something with the Select..Case syn...