標題:
[發問]
請教如何設定儲存格的預設值?
[打印本頁]
作者:
z71078170
時間:
2015-11-27 18:07
標題:
請教如何設定儲存格的預設值?
最近小弟又碰到了一個問題
想偵測在A1:A200的欄位中輸入資料後,若隔壁欄位B1為空值則自動複製A1
反之B1<>""就不複製A1的值
想請教是否可解?
目前有製作出在範圍內雙擊可填入該欄位值 如下
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim icbc As Object
For Each icbc In Application.CommandBars("cell").Controls
If icbc.Tag = "brccm" Then icbc.Delete
Next icbc
If Not Application.Intersect(Target, Range("M1:N200")) _
Is Nothing Then
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, before:=6, _
temporary:=True)
If ActiveCell = "" Then
ActiveCell.FormulaR1C1 = "Y"
Else
ActiveCell.ClearContents
End If
End With
End If
End Sub
複製代碼
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)