-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSheet1
More file actions
54 lines (49 loc) · 1.91 KB
/
Sheet1
File metadata and controls
54 lines (49 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Control = "CheckBox1, 18, 0, MSForms, CheckBox"
Option Explicit
Private alreadyPrompted As Boolean
Private Sub Worksheet_Activate()
' If alreadyPrompted Then Exit Sub
' If Range("AM10").Value / Range("AJ10").Value < 0.15 Then
' Dim current As Double
' current = Round(((Range("AM10").Value / Range("AJ10").Value) * 100), 1)
' MsgBox "Máš preèítaných menej než 15 percent kníh!" & vbNewLine & "Momentálne " & current & "%."
' alreadyPrompted = True
' End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim ISBN As String
For Each cell In Range(DATE_RANGE)
If Not Intersect(Target, cell) Is Nothing Then
If cell.Value = "Dnes" Or cell.Value = "dnes" Or cell.Value = "d" Then
cell.Value = Format(Date, "d.m.yyyy")
End If
End If
Next cell
ActiveSheet.Calculate
For Each cell In Range(ISBN_RANGE)
If Not Intersect(Target, cell) Is Nothing Then
If CheckBox1.Value = True Then
autoFill cell 'multiple arguments has to be without ()
End If
End If
Next cell
For Each cell In Range(PUBLISHER_RANGE)
If Not Intersect(Target, cell) Is Nothing Then
If cell.Value = "SNKLU" Then
cell.Value = "Státní nakladelství krásné literatury a umení"
End If
If cell.Value = "SNKLHU" Then
cell.Value = "Státní nakladatelství krásné literatury, hudby a umení"
End If
End If
Next cell
End Sub