Entries feed    Comments feed

Tag - VBA

Setting a reference to the VBA Extensibility library

When your coding the VBE you have to set a reference to the VBA Extensibility library. This can be done manualy, but also with the following code. Sub MakeLibrary()      On Error Resume Next                    'if it already exits      ThisWorkbook.VBProject.References _              .AddFromGuid...

Continue reading

VBA Code - Select Start and Search Text in Text Box

  VBA CODE FOR Select Start in Text Box: You need a 'Form' with 'Two Textbox' Private Sub Form_Load ()    Text1.Text = "Two of the peak human experiences"    Text1.Text = Text1.Text & " are good food and classical music." End Sub Private Sub Form_Click ()    Dim Search, Where...

Continue reading

Populating ListBox in VBA - Excel

List Populating for multi-column: ListCount starts at 1 when counting ListBox items or List. But ListBox Indexing of those items or List starts at 0. In your example, you are trying to add an item or List in a Multi-Column ListBox.  Take a look at below example: With me.ListBox1     .Add...

Continue reading