Ikt 3-mavzu Reja


Download 285.58 Kb.
Sana17.06.2023
Hajmi285.58 Kb.
#1538419
Bog'liq
3-amaliy

IKT

3-mavzu

Reja

  • MS Excelda VBA orqali modul yaratish
  • VBA orqali yacheyka orasiga bo`sh qator qo`shish
  • VBA orqali yacheykadagi barcha harflarni katta harflarga o`tkazish
  • VBA orqali yacheykadagi barcha harflarni kichik harflarga o`tkazish
  • Yacheykaga avtomatik raqam kiritish

VBAProject da modul yaratish

VBAProject da modul yaratish

  • Chapda joylashgan oynaga sichqonchani olib boring va o`ng tugamasini bosing, “Insert” tugamasiga boring, “Module” ni tanlang

VBAProject da modul yaratish

VBAProject da modul yaratish

  • Quyidagi oyna ochilsa demak siz MS Excel dasturida modul yaratdingiz. Modulga kod yozish orqali avtomatlashtirish mumkin

Yacheyka tepasiga yangi qator qo`shish

Modulga quyidagi kodni kiriting

  • Sub Qator_qoshish()
  • Dim Rng As Range
  • Dim CountRow As Integer
  • Dim i As Integer
  • Set Rng = Selection
  • CountRow = Rng.EntireRow.Count
  • For i = 1 To CountRow
  • ActiveCell.EntireRow.Insert
  • ActiveCell.Offset(2, 0).Select
  • Next i
  • End Sub

Yacheykadagi barcha harflarni katta harfga o`tkazish

  • Modulga quyidagi kodni kiriting
  • Sub Change_All_To_UPPER_Case()
  • Dim Rng As Range
  • For Each Rng In Selection.Cells
  • If Rng.HasFormula = False Then
  • Rng.Value = UCase(Rng.Value)
  • End If
  • Next Rng
  • End Sub

Yacheykadagi barcha harflarni kichik harfga o`tkazish

  • Modulga quyidagi kodni kiriting
  • Sub Change_All_To_LOWER_Case()
  • Dim Rng As Range
  • For Each Rng In Selection.Cells
  • If Rng.HasFormula = False Then
  • Rng.Value = LCase(Rng.Value)
  • End If
  • Next Rng
  • End Sub

Yacheykaga avtomatik raqam kiritish

  • Modulga quyidagi kodni kiriting
  • Sub Insert_Numbers_From_Top()
  • Dim i As Integer
  • For i = 1 To 50
  • Cells(i, 1).Value = i
  • Next i
  • End Sub

Download 285.58 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling