|
シート上でフォームのボタンで下記動作させています
同時に標準モジュールのマクロを動作させられますか?
教えてください
Sub 消去月曜()
Dim 日付 As Date
ActiveSheet.Unprotect
Range("D10:G30,J10:Q30,I11:I12,I14:I30,D32:D38").Select
Selection.ClearContents
日付 = Now()
Do Until Weekday(日付) = 2
日付 = 日付 + 1
Loop
With Range("J6")
.Value = Format(日付, "yyyy/mm/dd")
.Select
End With
Dim II As Integer, RR As Long, CC As Long
For II = 1 To 14
Select Case II
Case 1 To 7: RR = 7 + II * 3: CC = 6
Case Else: RR = 24 + II: CC = 4
End Select
Worksheets("sheet1").Cells(RR, CC) _
.Value = "=Calendar!H" & (4 + II)
If II < 8 Then
Worksheets("sheet1").Cells(RR, 10) _
.Value = "=Calendar!I" & (4 + II)
End If
Next
End Sub
標準モジュールは下記です。
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub テロップ()
Dim st1 As String, SP1 As String, TX1 As String, Flg As Boolean
Dim DefoFntIdx As Long, Defocol As Double, i As Long
Dim MAd As String
MAd = "B2"
st1 = "計算中!!"
SP1 = StrConv(Space(4), vbWide) '間隔
'文字を1回1回ループさせようと思ったが、最初に作っておくのが簡単。
For i = 1 To 6
TX1 = TX1 & st1 & SP1
Next
:
:
:
End Sub
|
|