Beruflich Dokumente
Kultur Dokumente
Karthikeyan K
Aug 06 2015
Article
4
36
220.6k
facebook
twitter
linkedIn
google Plus
Reddit
WhatsApp
Email
o
oBookmark
o Print
o Other Artcile
Expand
Sourcefiles.rar
Download Free Office API
This article is mainly focused on creating applications using the Visual Basic for Applications (VBA)
programming language. With Excel VBA you can automate tasks in Excel using what is called a
macro. Create a simple macro that will be executed after clicking on a command button.
Chapter 1
In this chapter, learn how to turn on the Developer tab. The Developer tab is not visible by default in
Excel, we must configure it to show that tab. This tab contains a variety of tools that allows
development and customization of Excel macro applications.
The following figure shows the File tab and Options button in Excel 2010.
3. Choose the Customize Ribbon button in the Excel Options dialog box.
Chapter 2
This chapter teaches you how to create a simple login form in Excel VBA. The User form we will
create looks as follows.
The following figure shows the simple login form in Excel VBA.
Step 1
6. Right-click Sheet1 and click View code to write the code between Private Sub
CommandButton1_Click () and End Sub.
Step 2
Add Controls.
1. Add the controls listed in the table below. Clicking on control from the Toolbox next you can
drag a control on a User Form:
Command Button 1
I modified some of the properties for that control
TextBox 1
TextBox 2
Image 1(Login)
Image 2(Username)
2. In the Project Explorer, right-click on UserForm1 and then click View Code.
Step 3
1. Exit the Visual Basic Editor, enter the labels and data shown below into rows.
2. Deselect the Design mode selection then click Command Button 1 on the sheet.
Demos
The following figure shows the Welcome page after successful login.
The following figure shows entering an invalid password.
The following figure shows login status and login attempt.
The following figure shows an account blocked after trying the wrong password 3 times.
Thanks for reading. I hope this article useful for VBA beginners.
Excel
Excel VBA
Macro
VBA
Karthikeyan K
Hi this is Karthik working as Software Engineer on Microsoft Technologies with BFSI Domain.
https://www.c-sharpcorner.com/Authors/88d8c0/karthikeyan-k.aspx