Excel VBA DERS-12 / Excel VBA COURSE-12

in #utopian-io7 years ago (edited)

What Will I Learn?

  • Excel VBA dili
  • Excel makro kullanımı

Requirements

  • Microsoft Office 2007 ve üstü sürüm

Difficulty

  • Intermediate

Tutorial Contents

Merhaba arkadaşlar Excel VBA dersimizin 12. sine geçtik. 11. dersimizde sizlere "Kullanıcı adı ve Parola değiştirme paneli" hazırlamayı anlatmıştım. Bu dersimizde size "Program ana ekranı" hazırlamayı göstereceğim.

Hello friends We have passed the 12th grade of Excel VBA lesson. In my 11th lesson, I told you how to prepare "User Name and Password Change Panel". In this lesson, I will show you how to prepare the "program main screen".

Öncelikle daha önce hazırladığımız excel sayfamızı açıyoruz ve yeni bir userform oluşturuyoruz. Oluşturduğumuz "userform" u " genişletelim.

First, we open up our excel sheet, which we have already prepared, and create a new UserForm. We created "UserForm" u "expand.


1- Yeni oluşturduğumuz userform üzerine "tanımlamalar ve özel servisler" kadında 2 tane "commandbutton" ekliyoruz

1- In the newly created UserForm, we add 2 "commandbutton" to "definitions and special services"

2- 2 adet "Frame" aracı ekliyoruz. Bu aracı daha önceki derslerimizde kullanmadık. Bu dersimizde ilk defa kullanacağız. Kullanımı oldukça basit bir araç az fonksiyonlu ama ilerleyen derslerimizde sıkca kullanabileceğimiz bir araçtır.

2- We add 2 "Frame" tools. We have not used this tool in our previous lessons. We will use this for the first time. A very simple tool to use is a small function but it is a tool that we can use frequently in our progressive lessons.

3- Oluşturduğumuz frame araçlarının kenarlarından tutarak üst üste gelmesini sağlayalım.

3- Let's make sure that the frame tools that we have created are coming up on top of each other.

4- Son adımda yaptığımız işlemden sonra tasarım kısmını bitirdik. Şimdi hiçbir aracı seçmeden userform üzerine iki kez tıklıyoruz;

  • Karşımıza kod sayfası açılacaktır. Açılan kod sayfası "Private sub UserForm_Click() ---- End Sub" kod aralığına birşey yazmadan. Alt tarafa geçerek Pirivate Sub UserForm_Initialize() kodunu yazalım.

4- After the last step, we finished the design part. Now we double click on the UserForm without selecting any tool;

  • The code code page will be opened. The code page that pops up is "Private sub UserForm_Click () ---- End Sub" without writing anything into the code range. Let's write the Pirivate Sub UserForm_Initialize () code by going to the bottom.

5- kod başlangıcının altına, alt alta gelecek şekilde

Private Sub UserForm_Initialize() (başlangıç kodu)
Frame1.Visible = False
Frame2.Visible = False
End Sub (bitiş kodu)

Kodlarını yazalım.

5- below the beginning of the code, the bottom line will come

Private Sub UserForm_Initialize () (startup code)
Frame1.Visible = False
Frame2.Visible = False
End Sub (end code)

Let's write the codes.

6- Yazdığımız kodları denemek için proje tasarım penceresine geri dönüyoruz ve "Run Sub/UserForm" butonuna basıyoruz. Karşımıza gelen bizim hazırladığımız "Ana sayfa Ekranı"dır. Görüntüleme yaptığımızda eklediğimiz frame araçlarını göremediğimizi anlıyoruz. Yazdığımız kod ile frame araçlarınının görünürlülüğünü kapattık. Bir sonraki aşamada eklediğimiz commandbuttonlar sayesinde framelerin görünür olmasını sağlayacağız. ve istediğimiz gibi bir ana sayfa ekranı oluşturacağız.

6-We go back to the project design window and hit the "Run Sub / UserForm" button to try the codes we wrote. Our counterpart is the "Home Screen" we prepared. When we view it, we understand that we can not see the frame tools we added. With the code we wrote we closed the visibility of the frame tools. In the next step we will add the command buttons to make the frames visible. and we will create a homepage screen as desired.


7- Tekrar Proje tasarım ekranını açıyoruz. Ve daha önce eklediğimiz "Bilgi Gİrişi" Tuşuna iki kez tıklayıp kod ekranını açmayı sağlıyoruz. Gelen kod ekranında "Bİlgi Girişi" butonuna kod yazacağız. Bunun için aşağıdaki kodları ekleyelim
Private Sub CommandButton1_Click()
Frame1.Visible = True
Frame2.Visible = False
End Sub

7-We are opening the project design screen again. And we've added the "Info Griecy" key twice before, and we double-click to open the code screen. In the incoming code screen we will write the code for the "Input Source" button. Add the following codes for this
Private Sub CommandButton1_Click ()
Frame1.Visible = True
Frame2.Visible = False
End Sub

8- yedi numaralı adımda anlattığım işlemin aynısını "Özel Servisler" Butonuna da yapalım ve aşağıdaki kodları yazalım.
Private Sub CommandButton1_Click ()
Frame1.Visible = False
Frame2.Visible = True
End Sub

8-Let's do the same process that I mentioned in step 7 on the "Special Services" Button and write the following codes.
Private Sub CommandButton1_Click ()
Frame1.Visible = False
Frame2.Visible = True
End Sub

9- Bu kez proje tasarım penceremize tekrar gelerek Frame1 aracının içine Label aracıyla "Bilgi Girişi Ekranı" yazalım. Frame2 aracının içine de "Kullanıcı adı ve Parolo Değiştirme Ekranı" yazalım.
NOT : Üst üste koyduğumuz frameleri ayırıp bu işlemi yapınız.

9-This time, I will come back to my project design window and write "Information Entry Screen" into the Frame1 tool with Label tool. In Frame2, enter "* User Name and Parole Replacement Screen".
NOTE: Do this by separating the frames that we put on top of each other.


10- Daha sonra eklediğimiz Label araçlarına sırayla iki kez tıklayarak daha önce oluşturduğumuz Ekranları kod olarak tanımlayalım.
Bilgi Girişi Ekranını daha önce --> UserForm3 penceresine ekledik.
Bu yüzden Bilgi Girişi Ekranı yazan Label Aracına 2 kez tıklayıp.
Private sub Label1_Click()
UserForm3.Show
End Sub

Parola Değiştirme Ekranına daha önce --> USerForm5 penceresine ekledik.
Bu yüzden Kullanıcı adı ve Parola Değiştirme Ekranı yazan Label Aracına 2 kez tıklayıp.
Private sub Label2_Click()
UserForm5.Show
End Sub

Kodlarını yazıyoruz.

10- Next, we double-click on the Label tools we added to define the screens we created earlier as codes.
We have added the Information Input Screen to the previous -> UserForm3 window.
So click on the Label Tool which displays the Information Entry Screen 2 times.
Private sub Label1_Click ()
userform3.show
End Sub

We have added the -> USerForm5 window to the Password Change Screen before.
So click on the Label Tool which displays User Name and Password Change Screen 2 times.
Private sub Label2_Click ()
userform5.show
End Sub

We're writing the codes.

11- Bu işlemleri gerçekleştirdikten sonra Frame araçlarını üst üste getirip. "Run Sub/UserFOrm" butonuna basarak kodları deneyelim. Öncelikle "Bilgi Girişi" butonunu deneyelim. Daha sonra da " Özel Servis" butonunu deneyelim."
11-After performing these operations, you can move the Frame tools up. Let's try the codes by pressing the "Run Sub / UserForum" button. First, let's try the "Information Input" button. Then I'll try the "Special Service" button. "


SONUÇ : Sonuç olarak görüyoruz ki "Ana Sayfa" ekranımızda sayfalar arası geçiş yapıyoruz ve eklediğimiz taktirde diğer sayfalara geçişi yapabiliyoruz.

CONCLUSION: As a result we see that we switch between pages in our "Home" screen, and we can switch to other pages if we add them.
Ve son olarak daha önceki derslerimizde bahsettiğim Image nesnesi ekleyerek "Anasayfa" ekranımıza bir Image ekleyerek program amblemimiz ekleyerek. "Ana sayfa" ekranını görsel olarak güzelleştirebiliriz.
And finally, by adding the Image object we mentioned in our previous lessons, we added our program emblem by adding an Image to our "Home" screen. We can visually enhance the "Home" screen.

Curriculum

-

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @hasans19 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 64850.80
ETH 3471.70
USDT 1.00
SBD 2.55