質問編集履歴
2
タグの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,43 +32,41 @@
|
|
32
32
|
|
33
33
|
ーーーーーーー(引き渡したい値/コンボボックスに入力する値↓)---------------
|
34
34
|
|
35
|
-
Dim i As Integer
|
35
|
+
1:Dim i As Integer
|
36
36
|
|
37
|
-
Dim VYear As Integer
|
37
|
+
2:Dim VYear As Integer
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
VYear = Year(Date)
|
41
|
+
3:VYear = Year(Date)
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
For i = VYear - 1 To VYear + 1
|
45
|
+
4:For i = VYear - 1 To VYear + 1
|
46
46
|
|
47
|
-
CmbBox_年.AddItem i
|
47
|
+
5:CmbBox_年.AddItem i
|
48
48
|
|
49
|
-
CmbBox_年.value = VYear
|
49
|
+
6:CmbBox_年.value = VYear
|
50
50
|
|
51
51
|
|
52
52
|
|
53
|
-
Next
|
53
|
+
7:Next
|
54
54
|
|
55
|
-
End Sub
|
55
|
+
8:End Sub
|
56
56
|
|
57
57
|
|
58
58
|
|
59
59
|
ーーーーーー(値の引き渡しを指示するプロシージャ↓)--------------------
|
60
60
|
|
61
|
-
Private Sub CmdBtn_作成_Click()
|
61
|
+
1:Private Sub CmdBtn_作成_Click()
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
Profile_List_年度全員 CmbBox_年.Text
|
65
|
+
2:Profile_List_年度全員 CmbBox_年.Text
|
68
66
|
|
69
67
|
|
70
68
|
|
71
|
-
End Sub
|
69
|
+
3:End Sub
|
72
70
|
|
73
71
|
|
74
72
|
|
@@ -76,37 +74,37 @@
|
|
76
74
|
|
77
75
|
ーーーーーーー(引き渡されるプロシージャ↓)-------------------
|
78
76
|
|
79
|
-
Option Explicit
|
77
|
+
1:Option Explicit
|
80
78
|
|
81
|
-
Sub Profile_List_年度全員(ByVal VVYear As String)
|
79
|
+
2:Sub Profile_List_年度全員(ByVal VVYear As String)
|
82
80
|
|
83
81
|
|
84
82
|
|
85
|
-
Dim aa As String
|
83
|
+
3:Dim aa As String
|
86
84
|
|
87
|
-
Dim bb As String
|
85
|
+
4:Dim bb As String
|
88
86
|
|
89
87
|
|
90
88
|
|
91
|
-
aa = Dir("C:\Users\me\Desktop\VBA\共有フォルダ\勉強用 "
|
89
|
+
5:aa = Dir("C:\Users\me\Desktop\VBA\共有フォルダ\勉強用 " And VVYear And " 人数データ.xlsx")
|
92
90
|
|
93
|
-
bb = Dir("C:\Users\me\Desktop\VBA\Profile List Maker.xlsm")
|
91
|
+
6:bb = Dir("C:\Users\me\Desktop\VBA\Profile List Maker.xlsm")
|
94
92
|
|
95
93
|
|
96
94
|
|
97
|
-
Workbooks.Open Filename:="C:\Users\me\Desktop\VBA\共有フォルダ
|
95
|
+
7:Workbooks.Open Filename:="C:\Users\me\Desktop\VBA\共有フォルダ\勉強用 " And VVYear And " 人数データ.xlsx", ReadOnly:=True
|
98
96
|
|
99
|
-
Workbooks(aa).Worksheets(VVYear And "年 人数データ").Copy after:=Workbooks(bb).Worksheets(Worksheets.Count)
|
97
|
+
8:Workbooks(aa).Worksheets(VVYear And "年 人数データ").Copy after:=Workbooks(bb).Worksheets(Worksheets.Count)
|
100
98
|
|
101
99
|
|
102
100
|
|
103
|
-
Workbooks(aa).Close Filename:="C:\Users\me\Desktop\VBA\共有フォルダ
|
101
|
+
9:Workbooks(aa).Close Filename:="C:\Users\me\Desktop\VBA\共有フォルダ\勉強用 " And VVYear And " 人数データ.xlsx"
|
104
102
|
|
105
103
|
|
106
104
|
|
107
105
|
|
108
106
|
|
109
|
-
End Sub
|
107
|
+
10:End Sub
|
110
108
|
|
111
109
|
|
112
110
|
|