What is VBA for?

dave_br

Board Regular
Joined
Aug 23, 2010
Messages
76
Forgive my ignorence guys, but it seems like VBA could be a great help to learning to use excel to a fuller level,

so....

what does/can it do?

waht is the best way to learn visual Basic? is it to go on a course or can it be self taught?

dave
 
I began learning VBA very recently by picking up a few books on the the subject. It can seem daunting in the very beginning for someone who has absolutely no programming background but from what I've read, VBA is a lot easier than than many other languages. Just stick to it and you will soon be writing some very useful code.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
It can even be used to open up your DVD drive. ;) (That's a fun little prank I like to play on coworkers from time to time)


That would be interesting to do? Would you be prepared to share the code !
 
Upvote 0
Something like this (for 32bit Office):
Code:
Public Declare Sub mciSendStringA Lib "winmm.dll" (ByVal lpstrCommand As String, _
    ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, _
    ByVal hwndCallback As Long)

Sub OpenCDTray()
    mciSendStringA "Set CDAudio Door Open", 0&, 0, 0
End Sub
Sub CloseCDTray()
    mciSendStringA "Set CDAudio Door Closed", 0&, 0, 0
End Sub
 
Upvote 0
Rory,

Thank you for that, will be interesting to see a few faces when I use this:)
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top