Log in

View Full Version : A general question regarding VBA



xxsomethingx
10-13-2010, 03:56 PM
Hello,

I just have a few quick question about VBA. First off, I'm pondering on what exaclty VBA can accomplish. I haven't had much experience with it although I am quite knowledgable in VB.net(totally different, I know) so I was just wondering if there are any API(not sure if they have API's for VBA, very new to this) so I can browse through them to decide what I could do?

I'm also wondering if I could make a macro/program using VBA to scan numbers and pick out certain numbers? I'm only asking because I would like to create something at work and all I have access to is VBA. Would creating a vba script be able to scan numbers on a .pdf and spit out said numbers back to me that don't fit the criteria?

Any help would be appreciated. Thanks!

macropod
10-13-2010, 07:37 PM
Hi xx,

VBA is a very capable programming environment and, provided you have the relevant Adobe Type Library installed and added to your vba references, reading a PDF file is not at all difficult. There's sample code for doing just that available on various web sites.

micky811
10-14-2010, 05:32 AM
error

xxsomethingx
10-14-2010, 10:03 AM
Thanks for the reply. I've never created a macro but would it matter in what program I create the macro in? word,access,excel, etc?

fumei
10-14-2010, 10:58 AM
Generally speaking, no it would not. There are some object differences in the various applications, but the general functions of VBA are applicable in all flavours.

" if there are any API(not sure if they have API's for VBA, very new to this) so I can browse through them to decide what I could do?"

It would be better to express what you DO want to do first, then see if VBA can handle it. Frankly, this is a good idea regardless of programming language/environemnt.

" I am quite knowledgable in VB.net(totally different, I know"

Not that different really. Yes, somewhat. You can access API with VBA. Most math functions are the same.

macropod
10-14-2010, 01:19 PM
would it matter in what program I create the macro in?As a rule, it's usually best to code the macro using the app in which you want to work with the data. There generally wouldn't be much point coding in Excel if you want to use the data in Word; you'd just be making things harder for yourself.

fumei
10-14-2010, 01:58 PM
LOL, yes that is true.