Macros vs. VB

johannaellamay

Registered User.
Local time
Today, 10:09
Joined
Jul 19, 2014
Messages
190
I was just wondering,

What are the main differences between VB and Macros?
When do I use VB or Macros?
Which one is easier to understand, and more flexible?

Please help me understand better. I'm on the process of creating a database from scratch, and this is my first time ever. I've now moved on to Forms. In my form, I want to make a button, that when clicked, should have a message box asking the user a question then has two or three buttons rather than just "OK." So I tried to do it using Macro, but I cannot understand it. I asked a few of my friends and they told me they prefer VB because it's easier. Is that true? -_-
 
Vba is a language. Macros, by comparison, are like a tourist parleur with ready-made sentences.

You can express more using VBA. If you are only going to do this twice a year, or do a web applicationm, then use macros, because they guide you, if you pay attention to how things are. Otherwise use VBa. Eventually it is not even a question of either/or but of convenience. That you do not understand, now, how it works is immaterial - you can learn just like all of us who did not get VBA/Macros with mother's milk.
 
We did have a member here, a while back who did everything with macros. mike365 was his handle I seem to recall.
 
You can also convert MS Access 2007 macros.
 
I did one small project in macros just to see. Working with them was so painfully slow that I would never use them again.
 
I agree with everyone, here's my take:
What are the main differences between VB and Macros?
I'm sure that macros run pre-compiled VBA code so of course you're better off doing things at the lower level, i.e. in code. A macro just can't be compared to code, code wins hands down so get on board.

When do I use VB or Macros?
Access Web Apps are restricted to macros. A macro can also be set to run automatically when a db opens, it's called an autoexec macro. You can simulate the same thing in code.

Which one is easier to understand, and more flexible?
Ease of understand is down to preference/ability and willingness, but in the longer term you'll find VBA easier to work with and more flexible. There are tonnes of things you can do in code that macros just can't.
 
Wow. Okay. Thank you so much for responding so positively. So I guess it's a consensus. Macros, as I have understood, are ready-made codes. They're easier but are less flexible. My next question now is this.

When do I use a Web-based db, and a desktop database? What are the differences? Can you give me examples of databases that would be better made with web or desktop? Right now, I honestly want to use Macros because they're easier, and I might want to make a web-database (only I don't really know it in-depth).

Also, if I understood it right, I can convert Macros to VB code, but not the other way around? Or can I?

I think my choosing of how I want to run my command buttons rely mainly on my choice, if I want to make a web or desktop db.

Not sure if I'm making sense. -_-
 
I don't think macros are easier, to be honest. There are many things you cannot do in macros, that you can easily do with code.

generally you need to be proficient in code. there is no real reason to need to be proficient in using something less flexible.


you interact with a web-database by opening a website. because of the way websites work, the logic is not the same as for an event driven desktop dbs, I think.
 
I think I will just start learning VBA. Just one last set of questions. What if I later on, I want to convert my current desktop database to a web-based one (assuming I had already learned VBA), would it still work if I had VBA? Is there a way to convert VBA to a web-compatible code? Or should I just make a new one?

And do you have any suggestions where I can read or watch tutorials for basic VBA? :)
 

Users who are viewing this thread

Back
Top Bottom