Skip to main content
gamedev.net
🔒 Locked

Macros, Embedded Objects... ?

Started by Mardigin 6 replies 700+ views
Original Post
Mardigin
Mardigin
I need some enlightenment. If someone says to you that they would like you to develop a macro that, for instance, will allow them to work with a spread sheet such as excel cvs file what exactally are they asking for? I have read about OLE objects that will allow you to run various MS applications such as access or excel inside of your application. Only from what I gather these are usually written in VB, and I would prefere to write it in C or C++. I know that Excel has an option that you can create macros as a tool, but again the language used is in VB, and I am not certain that is what they inteaded. Perhaps what was meant by a "macro" in this case is a service that runs in the background so that you could, for instance, performe some keystrokes that would popup a window allowing you to editi your files? The vision seems to be, from a GUI perspective, a window that allows you to view a record set from a cvs file. The window would actually be running some spreadsheet like excel, but the user would not know this. Mardigin.
Qw3r7yU10p!
Qw3r7yU10p!
macros in excel are vb. you can read up on them in the excel helpfiles
Themonkster
Themonkster
better off doing it in vb not excel. you can use excel objects on a vb from provided the controls are installed.

On the other hand the vba side of excel is just like vb6 and you can create forms and what not in it.

tools macros visual basic editor.

if you want the user not to see the excel part of it then you will need to use the auto load sub to load a full screen form.

If you have access to hand or the access developers toolkit then I would do it in that much faster I would think.
Themonkster
Themonkster
PS I write macros as part of my job if someone says they want a macro writing within office then it''s going to be a vba one.

you can write your own c++ com objects and use them with vba but it''s likely to be quicker if you just use vba. anyway it''s really easy and quick.
Mardigin
Mardigin
Thank you very much for your replies. I was hoping I would be able to do it in C or even C++, but it does seem that the most practical solution will be VB.
flangazor
flangazor
I got someone ''removed'' from a project I was working on because I wrote VBA scripts that did the entirety of their job.

For that, it has gained a place in my heart.
Mardigin
Mardigin
Will my macro run faster if it is written in Excel, or if I write it as a vb form with Excel as an OLE object? I may be dealing with large cvs files.

Mardigin

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.