General question about VBA in Excel

VBA2010

New Member
Joined
Jul 24, 2010
Messages
45
Hi,

I've recently started programming in VBA and I find it very rewarding actually. I feel that i've come a long way in a short amount of time and thats great! But...
I've come to the conclusion that its very hard to remember all the commands and codes that the VBA language contains by heart. So my question is:
What do you guys recommend that I should do when I want to program something and there is some command or code that I want to use but cant remember? I mean whats the most efficient way to handle such a situation so that I can find a qualified solution to the problem without necessarily memorizing all commands and codes!

How do/did you guys do it?

Thx,
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

milesUK

Active Member
Joined
Jan 5, 2003
Messages
388
vba2010, persinally I try to guess the feature and see if VBA recognises it. Failing that I do a quick seach of the Help for something that 'sounds' about right. Next I'll use macro recorder and finally I come here if I cannot replicate it in Excel itself!

Someone on this board used to have a very helpful signature (and may still have it) - something along the lines of 'Repeat after me, ' The macro Recorder is my friend" '. Sound advice.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,397
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
I tend to use:
1. The object browser - especially the search box.
2. The macro recorder.
3. Reference books.
4. Forums!
 

Darren Bartrup

Well-known Member
Joined
Mar 13, 2006
Messages
1,291
Office Version
365
Platform
Windows

ADVERTISEMENT

As rorya said, but also have a personal library of multi-purpose functions & procedures in .bas files.
No point in remembering how I wrote a piece of code when I can just drag it in from explorer :)
 

VBA2010

New Member
Joined
Jul 24, 2010
Messages
45
Thanks for the quick replies guys,

You all mention the macro recorder. Fx if I have a worksheet where I want every second row to be in 'bold', but I dont know how to do it - what would you recommend me to do?
 

VBA2010

New Member
Joined
Jul 24, 2010
Messages
45

ADVERTISEMENT

As rorya said, but also have a personal library of multi-purpose functions & procedures in .bas files.
No point in remembering how I wrote a piece of code when I can just drag it in from explorer :)
Where do I find this library? And what are .bas files?

:)
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
35,397
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
It depends which bit you are unsure of. If you don't know how to build the loop, then use a book or forum to find out. If it's just how to make the font bold, then look for the Font object, or search for Bold in the OB.
 

VBA2010

New Member
Joined
Jul 24, 2010
Messages
45
It depends which bit you are unsure of. If you don't know how to build the loop, then use a book or forum to find out. If it's just how to make the font bold, then look for the Font object, or search for Bold in the OB.
What do you mean by loop?
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,397
Messages
5,511,111
Members
408,825
Latest member
Goncalves74

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top