Posts

Showing posts from May, 2018

The scope of the Variables in VBA - Part 1

The scope of the variables means when we declare variable to hold some information in it, we need to provide those variables with some datatypes. DataTypes could be anything. Integer, long, string, variant etc... Sometimes we required a single variable to use it in multiple procedures and even throughout the whole project of the workbook sometimes. To understand the scope of the variables, we need to understand the basic structure of the VBA. Whatever the procedure you create it depends on your declaration, how you want to use those subprocedures and variables. There are three layers of the project. 1. Procedure 2. Module 3. Project the bottom layer is Procedure Like whatever you will define will stay up to that procedure only. E.g. insert the module and type the following sub-procedure. '/------------------------------------------ Private Sub Testing1() 'This is the Procedure.        Dim A as long        A = 1        msgbox A End Sub '/-------------

Concept of Connecting MySQL data into the EXCEL using VBA

There're numerous modules available on the internet about Importing MySQL Data into Excel using VBA. But What they don't explain is about the concept of the Connection string. you need to understand few important attributes of connecting MySQL server with ODBC Drivers. We need the following few things to attempt this procedure. 1. Go to the Tools > References > and choose Microsoft ActiveX Data Objects x.x Library (6.1 in my case)  2. Then we need to create two objects with ADODB (ActiveX Data Objects), one for connection and one for data storage (which brings data with it). We refer, Connection as ADODB.Connection, and  Recordset as ADODB.Recordset The first part is over. Now, comes the toughest part of the program where we need to create the connection between our excel workbook and the MySQL server where your data is kept under tables. Now, to connect both excel and server, we need to address the things very properly. and it should be. because without prov

The Wonderful Login System for the Excel VBA

This is Kamal Bharakhda & I'm here presenting my tools for Excel VBA Workbooks for its protection. Yes, I have named this Application as "The Wonderful Login System" What it actually does, it will help you to make secure your Excel Workbooks at high-level. Yes, this application will use the online resources to compare the login credentials. Main Operation & Features of using my Login System. 1. Your application will not be accessed off-line. Yes, if your system has active internet, then only you can access the login system in the first place. 2. After checking the activeness with the Internet, you will see the Login form right at the moment. Now, Enter your credentials. 3. After entering the user details, you need to hit the "LOGIN" button once, and it will compare your provided pieces of information with an online database, and if it goes wrong then it gives the wrong messaged popups. 4. Let's say if you want to restrict one of the users the