Alternative IDE for VB6 and VBA [closed]

I have never heard of an alternative IDE for Vb6. However, these two (free) VB6 add-ins are indispensable and will make your life easier – especially if there is a lot of code. They are equally effective for VBA in Microsoft Office. MZ-Tools: provides a superb collection of IDE tools – finding unused variables, unused … Read more

Save text file UTF-8 encoded with VBA

I found the answer on the web: Dim fsT As Object Set fsT = CreateObject(“ADODB.Stream”) fsT.Type = 2 ‘Specify stream type – we want To save text/string data. fsT.Charset = “utf-8” ‘Specify charset For the source text data. fsT.Open ‘Open the stream And write binary data To the object fsT.WriteText “special characters: äöüß” fsT.SaveToFile sFileName, … Read more

Is it possible to declare a public variable in vba and assign a default value?

.NET has spoiled us 🙂 Your declaration is not valid for VBA. Only constants can be given a value upon application load. You declare them like so: Public Const APOSTROPHE_KEYCODE = 222 Here’s a sample declaration from one of my vba projects: If you’re looking for something where you declare a public variable and then … Read more

Continue For loop

You can use a GoTo: Do ‘… do stuff your loop will be doing ‘ skip to the end of the loop if necessary: If <condition-to-go-to-next-iteration> Then GoTo ContinueLoop ‘… do other stuff if the condition is not met ContinueLoop: Loop

What is the difference between Dim, Global, Public, and Private as Modular Field Access Modifiers?

Dim and Private work the same, though the common convention is to use Private at the module level, and Dim at the Sub/Function level. Public and Global are nearly identical in their function, however Global can only be used in standard modules, whereas Public can be used in all contexts (modules, classes, controls, forms etc.) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)